[PATCH] Qualify calls to __never_valueless in <variant>

Jonathan Wakely jwakely@redhat.com
Thu Jun 20 14:18:00 GMT 2019


	* include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
	Qualify calls to __never_valueless.

Tested x86_64-linux, committed to trunk.


-------------- next part --------------
commit f432c00da2ed386e356ac23a41a9cf943a2e2c3a
Author: redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Jun 20 14:17:51 2019 +0000

    Qualify calls to __never_valueless in <variant>
    
            * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
            Qualify calls to __never_valueless.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272508 138bc75d-0d04-0410-961f-82ee72b054a4

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 <typename... _Types>
 	struct _Variant_never_valueless<variant<_Types...>>
-	: bool_constant<__never_valueless<_Types...>()> {};
+	: bool_constant<__variant::__never_valueless<_Types...>()> {};
 
       static constexpr bool value =
 	(is_same_v<_Maybe_variant_cookie, __variant_cookie>


More information about the Libstdc++ mailing list