diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-05-04 12:16:46 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-05-04 12:16:46 +0100 |
commit | af5b2b911dd80ae9cc87404b7e7ab807cf6655d4 (patch) | |
tree | b28d4349aad905b711cb7166bdcf7c50cf437efe /gcc/read-rtl-function.c | |
parent | ad0a3be4df5eecc79075d899fd79179d0f61270e (diff) | |
download | gcc-af5b2b911dd80ae9cc87404b7e7ab807cf6655d4.zip gcc-af5b2b911dd80ae9cc87404b7e7ab807cf6655d4.tar.gz gcc-af5b2b911dd80ae9cc87404b7e7ab807cf6655d4.tar.bz2 |
libstdc++: Do not use deduced return type for std::visit [PR 100384]
This avoids errors outside the immediate context when std::visit is an
overload candidate because of ADL, but not actually viable.
The solution is to give std::visit a non-deduced return type. New
helpers are introduced for that, and existing ones refactored slightly.
libstdc++-v3/ChangeLog:
PR libstdc++/100384
* include/std/variant (__get_t): New alias template yielding the
return type of std::get<N> on a variant.
(__visit_result_t): New alias template yielding the result of
std::visit.
(__same_types): Move into namespace __detail::__variant.
(__check_visitor_results): Likewise. Use __invoke_result_t and
__get_t.
(__check_visitor_result): Remove.
(visit): Use __visit_result_t for return type.
* testsuite/20_util/variant/100384.cc: New test.
Diffstat (limited to 'gcc/read-rtl-function.c')
0 files changed, 0 insertions, 0 deletions