[libcxx-commits] [PATCH] D97911: [libcxx] adds concept std::semiregular
Christopher Di Bella via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 3 22:08:36 PST 2021
cjdb added a comment.
While this has mostly been copy/pasted from `copyable.compile.pass.cpp`, there **are** some differences, which I've highlighted.
================
Comment at: libcxx/test/std/concepts/object/semiregular.compile.pass.cpp:81-82
+static_assert(std::semiregular<std::vector<std::unique_ptr<int> > >);
+static_assert(std::semiregular<std::tuple<std::vector<std::unique_ptr<int> >,
+ std::optional<int> > >);
+
----------------
New test.
================
Comment at: libcxx/test/std/concepts/object/semiregular.compile.pass.cpp:103-107
+// Not default_initialzable
+static_assert(!std::semiregular<std::runtime_error>);
+static_assert(
+ !std::semiregular<std::tuple<std::runtime_error, std::overflow_error> >);
+static_assert(!std::semiregular<std::nullopt_t>);
----------------
New tests.
================
Comment at: libcxx/test/std/concepts/object/semiregular.compile.pass.cpp:144-150
+struct derived_from_non_default_initializable : std::nullopt_t {};
+static_assert(!std::semiregular<derived_from_non_default_initializable>);
+
+struct has_non_default_initializable {
+ std::in_place_t x;
+};
+static_assert(!std::semiregular<has_non_default_initializable>);
----------------
New tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97911/new/
https://reviews.llvm.org/D97911
More information about the libcxx-commits
mailing list