From: Jonathan Wakely Date: Fri, 9 Mar 2018 01:10:02 +0000 (+0000) Subject: PR libstdc++/84769 qualify std::get and std::get_if to avoid ADL X-Git-Tag: upstream/12.2.0~32975 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5dbbf8991de1fc28eee8764d21827dfd0ac69f2d;p=platform%2Fupstream%2Fgcc.git PR libstdc++/84769 qualify std::get and std::get_if to avoid ADL PR libstdc++/84769 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>): Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>. From-SVN: r258376 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8e8fa13..ae464dd 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2018-03-09 Jonathan Wakely + PR libstdc++/84769 + * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>): + Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>. + src/filesystem/ops.cc (create_dir): Pass error_code to is_directory. src/filesystem/std-ops.cc (create_dir): Likewise. diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant index 85a2428..4aba131 100644 --- a/libstdc++-v3/include/std/variant +++ b/libstdc++-v3/include/std/variant @@ -891,7 +891,7 @@ namespace __variant static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, "T should occur for exactly once in alternatives"); static_assert(!is_void_v<_Tp>, "_Tp should not be void"); - return get<__detail::__variant::__index_of_v<_Tp, _Types...>>(__v); + return std::get<__detail::__variant::__index_of_v<_Tp, _Types...>>(__v); } template @@ -900,7 +900,7 @@ namespace __variant static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, "T should occur for exactly once in alternatives"); static_assert(!is_void_v<_Tp>, "_Tp should not be void"); - return get<__detail::__variant::__index_of_v<_Tp, _Types...>>( + return std::get<__detail::__variant::__index_of_v<_Tp, _Types...>>( std::move(__v)); } @@ -910,7 +910,7 @@ namespace __variant static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, "T should occur for exactly once in alternatives"); static_assert(!is_void_v<_Tp>, "_Tp should not be void"); - return get<__detail::__variant::__index_of_v<_Tp, _Types...>>(__v); + return std::get<__detail::__variant::__index_of_v<_Tp, _Types...>>(__v); } template @@ -919,7 +919,7 @@ namespace __variant static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, "T should occur for exactly once in alternatives"); static_assert(!is_void_v<_Tp>, "_Tp should not be void"); - return get<__detail::__variant::__index_of_v<_Tp, _Types...>>( + return std::get<__detail::__variant::__index_of_v<_Tp, _Types...>>( std::move(__v)); } @@ -958,7 +958,8 @@ namespace __variant static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, "T should occur for exactly once in alternatives"); static_assert(!is_void_v<_Tp>, "_Tp should not be void"); - return get_if<__detail::__variant::__index_of_v<_Tp, _Types...>>(__ptr); + return std::get_if<__detail::__variant::__index_of_v<_Tp, _Types...>>( + __ptr); } template @@ -969,7 +970,8 @@ namespace __variant static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>, "T should occur for exactly once in alternatives"); static_assert(!is_void_v<_Tp>, "_Tp should not be void"); - return get_if<__detail::__variant::__index_of_v<_Tp, _Types...>>(__ptr); + return std::get_if<__detail::__variant::__index_of_v<_Tp, _Types...>>( + __ptr); } struct monostate { };