[libcxx-commits] [PATCH] D92255: [libc++] [P0202] constexpr set_union, set_difference, set_symmetric_difference, merge

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 3 13:57:17 PST 2020


zoecarver added inline comments.


================
Comment at: libcxx/test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp:61
+#if TEST_STD_VER >= 11
+static_assert(std::is_trivially_copyable<Trivial>::value, "");
+static_assert(!std::is_trivially_copyable<NonTrivial>::value, "");
----------------
Quuxplusone wrote:
> zoecarver wrote:
> > I think these will work in C++03. 
> Officially, neither `static_assert` nor `is_trivially_copyable` are present in C++11. `test/libcxx/containers/sequences/vector.bool/trivial_for_purposes_of_call.pass.cpp` is unsupported in C++03 and I can't see any reason it would be unsupported //except// for its reliance on the `is_trivially_` type-traits.
libc++ provides many of these things in C++03. Even rvalues and variadics work.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92255



More information about the libcxx-commits mailing list