aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-04-09 19:50:43 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-04-09 19:50:43 +0100
commit8701cb5e0dc0a3b949bb28f3ff9ee5bae98c47fe (patch)
tree0bd9c3d6f3251d67f4acf2bfbdd6917989e32da5 /gcc
parentbc203bf0dab0cdb39370357bc3244999a2f9e419 (diff)
downloadgcc-8701cb5e0dc0a3b949bb28f3ff9ee5bae98c47fe.zip
gcc-8701cb5e0dc0a3b949bb28f3ff9ee5bae98c47fe.tar.gz
gcc-8701cb5e0dc0a3b949bb28f3ff9ee5bae98c47fe.tar.bz2
Fix std::visit to support arbitrary callables
The __visitor_result_type helper didn't use std::invoke and so didn't compile when the visitor was a pointer-to-member rather than a function object. Use std::invoke_result instead. * include/std/variant (__variant_idx_cookie): Add member type. (__visitor_result_type): Remove. (__do_visit): Use invoke_result instead of __visitor_result_type. * testsuite/20_util/variant/visit.cc: New test. From-SVN: r270237
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions