From d306dee31dc030d1a9992927eb17b8171aaf8308 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 20 Jun 2019 15:17:51 +0100 Subject: [PATCH] Qualify calls to __never_valueless in * include/std/variant (_Variant_storage, _Extra_visit_slot_needed): Qualify calls to __never_valueless. From-SVN: r272508 --- libstdc++-v3/ChangeLog | 3 +++ libstdc++-v3/include/std/variant | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index db90efad5bf..d5e4c85b072 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2019-06-20 Jonathan Wakely + * include/std/variant (_Variant_storage, _Extra_visit_slot_needed): + Qualify calls to __never_valueless. + * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to C++17 working draft. diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant index c86b0c8ccf3..d93ea86ea29 100644 --- a/libstdc++-v3/include/std/variant +++ b/libstdc++-v3/include/std/variant @@ -422,7 +422,7 @@ namespace __variant constexpr bool _M_valid() const noexcept { - if constexpr (__never_valueless<_Types...>()) + if constexpr (__variant::__never_valueless<_Types...>()) return true; return this->_M_index != __index_type(variant_npos); } @@ -456,7 +456,7 @@ namespace __variant constexpr bool _M_valid() const noexcept { - if constexpr (__never_valueless<_Types...>()) + if constexpr (__variant::__never_valueless<_Types...>()) return true; return this->_M_index != __index_type(variant_npos); } @@ -799,7 +799,7 @@ namespace __variant template struct _Variant_never_valueless> - : bool_constant<__never_valueless<_Types...>()> {}; + : bool_constant<__variant::__never_valueless<_Types...>()> {}; static constexpr bool value = (is_same_v<_Maybe_variant_cookie, __variant_cookie> -- 2.30.2