mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-05 09:20:29 +00:00
constexpr make_unique
This commit is contained in:
parent
5faa879419
commit
d29f73e2d3
1 changed files with 2 additions and 2 deletions
|
@ -144,14 +144,14 @@ struct unique_ptr
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename... Args>
|
template<typename T, typename... Args>
|
||||||
unique_ptr<T>
|
constexpr unique_ptr<T>
|
||||||
make_unique(Args&&... args)
|
make_unique(Args&&... args)
|
||||||
{
|
{
|
||||||
return unique_ptr<T>(new T(ctl::forward<Args>(args)...));
|
return unique_ptr<T>(new T(ctl::forward<Args>(args)...));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
unique_ptr<T>
|
constexpr unique_ptr<T>
|
||||||
make_unique_for_overwrite()
|
make_unique_for_overwrite()
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue