[PATCH v1] PR libstdc++/84769 qualify std::get to avoid ADL
Jonathan Wakely
jwakely@redhat.com
Thu May 3 19:01:00 GMT 2018
On 03/05/18 20:55 +0200, Duarte Nunes wrote:
>PR libstdc++/84769
>* include/std/variant (visit<_Visitor, _Variants...>):
>Qualify call to std::get<_Np, _Types...>.
Thanks for the patch, I was already testing the same change and just
committed the attached patch to trunk. Backports for other branches to
follow shortly.
>---
> ChangeLog | 6 ++++++
> libstdc++-v3/include/std/variant | 2 +-
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
>diff --git a/ChangeLog b/ChangeLog
>index ec03a5bcdad..bf2c58aee2b 100644
>--- a/ChangeLog
>+++ b/ChangeLog
N.B. libstdc++ has its own ChangeLog file, in libstdc++-v3/ChangeLog
>@@ -1,3 +1,9 @@
>+2018-05-03 Duarte Nunes <duarte@scylladb.com>
>+
>+PR libstdc++/84769
>+ * include/std/variant (visit<_Visitor, _Variants...>):
>+ Qualify call to std::get<_Np, _Types...>.
>+
> 2018-05-01 Francois H. Theron <francois.theron@netronome.com>
>
> * configure.ac: Added "nfp" target.
>diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant
>index f64c037a514..40b3b566938 100644
>--- a/libstdc++-v3/include/std/variant
>+++ b/libstdc++-v3/include/std/variant
>@@ -1389,7 +1389,7 @@ namespace __variant
>
> using _Result_type =
> decltype(std::forward<_Visitor>(__visitor)(
>- get<0>(std::forward<_Variants>(__variants))...));
>+ std::get<0>(std::forward<_Variants>(__variants))...));
>
> constexpr auto& __vtable = __detail::__variant::__gen_vtable<
> _Result_type, _Visitor&&, _Variants&&...>::_S_vtable;
>--
>2.17.0
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 845 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20180503/19e1dc7c/attachment.bin>
More information about the Libstdc++
mailing list