Add another workaround to std::variant for Clang bug 31852
authorJonathan Wakely <jwakely@redhat.com>
Thu, 5 Apr 2018 16:59:13 +0000 (17:59 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 5 Apr 2018 16:59:13 +0000 (17:59 +0100)
* include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
__get calls to avoid ADL and avoid ambiguity due to Clang bug.

From-SVN: r259135

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/variant

index df667c1398dbaee0f3363be46156aa8e85fd8c8f..1d6fd8948713dbac0a787d69468fddc8eea02456 100644 (file)
@@ -1,3 +1,8 @@
+2018-04-05  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
+       __get calls to avoid ADL and avoid ambiguity due to Clang bug.
+
 2018-04-03  Jonathan Wakely  <jwakely@redhat.com>
 
        PR libstdc++/85183
@@ -18,7 +23,7 @@
        (less::__not_overloaded, greater_equal::__not_overloaded)
        (less_equal::__not_overloaded): Fix ambiguous specializations.
        * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
-       tests for type with overlaoded operators.
+       tests for type with overloaded operators.
 
 2018-03-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
index 028d306427275cba9bcd5cc0e793294ea8308181..48bec5284060e8243d675071bab0894a5964996c 100644 (file)
@@ -272,8 +272,8 @@ namespace __variant
     constexpr bool \
     __erased_##__NAME(const _Variant& __lhs, const _Variant& __rhs) \
     { \
-      return __get<_Np>(std::forward<_Variant>(__lhs)) \
-         __OP __get<_Np>(std::forward<_Variant>(__rhs)); \
+      return __variant::__get<_Np>(std::forward<_Variant>(__lhs)) \
+         __OP __variant::__get<_Np>(std::forward<_Variant>(__rhs)); \
     }
 
   _VARIANT_RELATION_FUNCTION_TEMPLATE(<, less)