unique_ptr<T> should be unique_ptr<T[]> when used with array
This commit is contained in:
parent
9cc5ca5c58
commit
28302a5040
@ -44,7 +44,7 @@ template <class T, class... Types> std::unique_ptr<T> make_unique(Types &&... Ar
|
|||||||
}
|
}
|
||||||
|
|
||||||
// make_unique<T[]>
|
// make_unique<T[]>
|
||||||
template <class T> std::unique_ptr<T> make_unique(std::size_t Size)
|
template <class T> std::unique_ptr<T[]> make_unique(std::size_t Size)
|
||||||
{
|
{
|
||||||
return (std::unique_ptr<T>(new T[Size]()));
|
return (std::unique_ptr<T>(new T[Size]()));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user