diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2018-04-05 17:59:13 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2018-04-05 17:59:13 +0100 |
commit | 970d3d9011542639b420610a29bf9046fcee606c (patch) | |
tree | 7a3c9e1a482a29f4ac8364b48bd530ab8ffbfd02 | |
parent | b5f3bb7b5f7d4a67ace230ed5b0c46cd71d41c6d (diff) | |
download | gcc-970d3d9011542639b420610a29bf9046fcee606c.zip gcc-970d3d9011542639b420610a29bf9046fcee606c.tar.gz gcc-970d3d9011542639b420610a29bf9046fcee606c.tar.bz2 |
Add another workaround to std::variant for Clang bug 31852
* include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
__get calls to avoid ADL and avoid ambiguity due to Clang bug.
From-SVN: r259135
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/include/std/variant | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index df667c1..1d6fd89 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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> diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant index 028d306..48bec528 100644 --- a/libstdc++-v3/include/std/variant +++ b/libstdc++-v3/include/std/variant @@ -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) |