EricWF added a comment.

My personal preference would be to diagnose `std::default_delete<T[N]>` and 
`std::unique_ptr<T[N]>`, but I'll defer to your judgment here.

An alternative implementation would be to provide a "default_delete<T[N]>" 
specialization. (Note that adding this specialization does not change the 
mangling, so it is ABI safe).


================
Comment at: include/memory:2525
@@ -2524,1 +2524,3 @@
 
+template <class _Tp, bool __isArray> struct __do_default_delete;
+template <class _Tp> struct __do_default_delete<_Tp, true>
----------------
`__isArray` doesn't match the current naming style for template parameters.

Also it would make sense to put the `is_array<_Tp>::value`  as a default 
parameter here.

================
Comment at: include/memory:2527
@@ +2526,3 @@
+template <class _Tp> struct __do_default_delete<_Tp, true>
+{      void operator() (_Tp* __ptr) const _NOEXCEPT { delete [] __ptr; }};
+
----------------
`_LIBCPP_INLINE_VISILIBITY`


http://reviews.llvm.org/D21320



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to