[libcxx-commits] [PATCH] D80452: [libc++] Complete overhaul of constexpr support in std::array

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat May 23 11:07:47 PDT 2020


zoecarver added inline comments.


================
Comment at: libcxx/include/array:246
+    struct _Empty { };
+    typedef typename conditional<is_const<_Tp>::value, const _Empty,
+                                _Empty>::type _CharType;
----------------
Why use a new `_Empty` struct? `char` makes more sense and has a defined size in the standard. 


================
Comment at: libcxx/include/array:246
+    struct _Empty { };
+    typedef typename conditional<is_const<_Tp>::value, const _Empty,
+                                _Empty>::type _CharType;
----------------
zoecarver wrote:
> Why use a new `_Empty` struct? `char` makes more sense and has a defined size in the standard. 
Nit: this could be `add_const`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80452/new/

https://reviews.llvm.org/D80452





More information about the libcxx-commits mailing list