[PATCH] D32671: [libcxx] [test] variant: test coverage for P0602 extension

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 25 00:40:23 PDT 2017


EricWF added inline comments.


================
Comment at: test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp:389
+template<class...Ts>
+constexpr bool triviality_test =
+  std::is_trivially_copy_assignable<std::variant<Ts...>>::value ==
----------------
`triviality_test` should also compare to an explicitly specified expected result, along with checking for consistency between variant and its input types.


================
Comment at: test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp:168
+void test_triviality_extension() {
+#if defined(_MSVC_STL_VER)
+  static_assert(triviality_test<int>, "");
----------------
These tests pass with libc++ too, so please add `|| defined(_LIBCPP_VERSION)`


================
Comment at: test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp:206
+void test_triviality_extension() {
+#if defined(_MSVC_STL_VER)
+  static_assert(triviality_test<int>, "");
----------------
These tests pass with libc++ too, so please add `|| defined(_LIBCPP_VERSION)`


https://reviews.llvm.org/D32671





More information about the cfe-commits mailing list