[libcxx-commits] [libcxx] Adds back special-case for booleans in std::variant gated by _LIBCPP_ENABLE_NARROWING_CONVERSIONS_IN_VARIANT. (PR #73121)
Jordan Rupprecht via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 22 07:24:42 PST 2023
================
@@ -33,8 +33,13 @@ int main(int, char**)
static_assert(!std::is_assignable<std::variant<int, bool>, decltype("meow")>::value, "");
static_assert(!std::is_assignable<std::variant<int, const bool>, decltype("meow")>::value, "");
-
+#if defined(_LIBCPP_ENABLE_NARROWING_CONVERSIONS_IN_VARIANT)
----------------
rupprecht wrote:
nit: it seems like `#ifdef` is preferred over `#if defined(...)`, I'd go w/ that.
https://github.com/llvm/llvm-project/pull/73121
More information about the libcxx-commits
mailing list