mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-04 00:40:27 +00:00
Simple using statements
This commit is contained in:
parent
5757eaf70d
commit
524f1fd2c2
1 changed files with 3 additions and 16 deletions
|
@ -24,22 +24,9 @@
|
||||||
// #include <type_traits>
|
// #include <type_traits>
|
||||||
// #define ctl std
|
// #define ctl std
|
||||||
|
|
||||||
template<typename T, typename D = ctl::default_delete<T>>
|
using ctl::unique_ptr;
|
||||||
using unique_ptr = ctl::unique_ptr<T, D>;
|
using ctl::make_unique;
|
||||||
|
using ctl::make_unique_for_overwrite;
|
||||||
template<typename T, typename... Args>
|
|
||||||
unique_ptr<T>
|
|
||||||
make_unique(Args&&... args)
|
|
||||||
{
|
|
||||||
return ctl::make_unique<T, Args...>(ctl::forward<Args>(args)...);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
unique_ptr<T>
|
|
||||||
make_unique_for_overwrite()
|
|
||||||
{
|
|
||||||
return ctl::make_unique_for_overwrite<T>();
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef ctl
|
#undef ctl
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue