[libcxx-commits] [libcxx] P1957R2: remove special-case for booleans in std::variant (PR #71502)

S. B. Tam via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 14 07:06:12 PST 2023


================
@@ -35,7 +35,7 @@ int main(int, char**)
   static_assert(!std::is_assignable<std::variant<int, const bool>, decltype("meow")>::value, "");
   static_assert(!std::is_assignable<std::variant<int, const volatile bool>, decltype("meow")>::value, "");
----------------
cpplearner wrote:

This line now causes an error in C++26 because

> error: volatile-qualified parameter type 'const volatile bool' is deprecated [-Werror,-Wdeprecated-volatile]

Since `std::variant` no longer treats `const volatile bool` specially, maybe this line could be deleted?

https://github.com/llvm/llvm-project/pull/71502


More information about the libcxx-commits mailing list