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

Zhihao Yuan via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 10 20:38:16 PDT 2019


lichray marked 2 inline comments as done.
lichray added inline comments.


================
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");
----------------
mclow.lists wrote:
> 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.
>  
(the messages in static_assert are just notes to people who read this code)

I added additional fail.cpp tests.


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