Kaydet (Commit) 64d06e5f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix o3tl::make_unique

...after 3f204714 "use std::unique_ptr in
FlatFndBox: and extend o3tl::make_unique to cope with arrays"

Change-Id: I17a07d0be677aa4a5427be4a5c2f05ed8b675726
üst 1b08f129
......@@ -23,7 +23,8 @@ namespace o3tl
* Can be replaced by std::make_unique when we allow C++14.
*/
template<typename T, typename... Args>
typename std::unique_ptr<T> make_unique(Args&& ... args)
typename std::enable_if<!std::is_array<T>::value, std::unique_ptr<T>>::type
make_unique(Args&& ... args)
{
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment