[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
Wed May 27 15:16:27 PDT 2020
zoecarver added inline comments.
================
Comment at: libcxx/include/array:245
+#ifndef _LIBCPP_CXX03_LANG
+ union __wrapper {
----------------
zoecarver wrote:
> This should be after C++11. In C++11 this won't be an aggregate (`__w` is a non-static member without initialization).
> __w is a non-static member without initialization.
This should say: "`__w` is a non-static member with default initialization."
================
Comment at: libcxx/include/array:245
+#ifndef _LIBCPP_CXX03_LANG
+ union __wrapper {
----------------
zoecarver wrote:
> zoecarver wrote:
> > This should be after C++11. In C++11 this won't be an aggregate (`__w` is a non-static member without initialization).
> > __w is a non-static member without initialization.
>
> This should say: "`__w` is a non-static member with default initialization."
After a quick scan it looks like there is no test for `is_aggregate<array<T, N>>`. Any chance you could add that (note: I think it is important to have checks for both `is_aggregate<array<T, N>>` and `is_aggregate<array<T, 0>>`)?
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