[libcxx-commits] [PATCH] D44865: [libc++] Implement P0608R3 - A sane variant converting constructor

Marshall Clow via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 10 15:26:05 PDT 2019


mclow.lists added a comment.

The patch looks fine to me, but I think you should consider making a couple of `T.fail.cpp` tests, and check to make sure you get the "right error".



================
Comment at: test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp:130
   {
     using V = std::variant<std::string, std::string>;
     static_assert(!std::is_assignable<V, const char *>::value, "ambiguous");
----------------
If you really want to check that these are "ambiguous" , or "no matching operator=", etc, the way to do that is to define a fail.cpp test, and check the error messages.
 


Repository:
  rCXX libc++

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

https://reviews.llvm.org/D44865





More information about the libcxx-commits mailing list