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
This commit is contained in:
parent
311735dbc6
commit
5dbbf8991d
2 changed files with 12 additions and 6 deletions
|
@ -1,5 +1,9 @@
|
|||
2018-03-09 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
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.
|
||||
|
||||
|
|
|
@ -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<typename _Tp, typename... _Types>
|
||||
|
@ -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<typename _Tp, typename... _Types>
|
||||
|
@ -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<typename _Tp, typename... _Types>
|
||||
|
@ -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 { };
|
||||
|
|
Loading…
Add table
Reference in a new issue