Namespaces
Variants
Views
Actions

Talk:cpp/memory/unique ptr/make unique

From cppreference.com

134.130.191.108 05:36, 4 August 2015 (PDT) What happens if the size passed to the array version of make unique is zero?

this page says it is equivalent to new typename std::remove_extent<T>::type[size], so you will have a dynamically-allocated array of no elements, just like when calling new int[0]; --Cubbi (talk) 06:11, 4 August 2015 (PDT)

[edit] Can you improve it?

Will a complete implementation please replace this Possible Implementation section?

unlikely: it would obscure the point this section is trying to make. There are always actual implementations people can read: libc++, libstdc++ --Cubbi (talk) 03:41, 19 January 2018 (PST)