public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/100384] Compiling in c++17 mode breaks compilation of functions named visit() Date: Fri, 18 Jun 2021 14:43:41 +0000 [thread overview] Message-ID: <bug-100384-4-NMt0L5Ovsc@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100384-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100384 --- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:91d29ed563bd7e787921f997ea2f80cd87ee59b2 commit r9-9592-g91d29ed563bd7e787921f997ea2f80cd87ee59b2 Author: Jonathan Wakely <jwakely@redhat.com> Date: Tue May 4 12:16:46 2021 +0100 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. 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. (__do_visit): Use __get_t. (visit): Use __visit_result_t for return type. * testsuite/20_util/variant/100384.cc: New test. (cherry picked from commit af5b2b911dd80ae9cc87404b7e7ab807cf6655d4)
next prev parent reply other threads:[~2021-06-18 14:43 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-02 15:38 [Bug c++/100384] New: " aacid at kde dot org 2021-05-02 15:38 ` [Bug c++/100384] " aacid at kde dot org 2021-05-03 12:59 ` [Bug libstdc++/100384] " aacid at kde dot org 2021-05-03 14:08 ` redi at gcc dot gnu.org 2021-05-03 14:44 ` ppalka at gcc dot gnu.org 2021-05-03 19:51 ` redi at gcc dot gnu.org 2021-05-03 20:02 ` redi at gcc dot gnu.org 2021-05-04 11:19 ` cvs-commit at gcc dot gnu.org 2021-05-06 13:06 ` cvs-commit at gcc dot gnu.org 2021-06-18 12:56 ` cvs-commit at gcc dot gnu.org 2021-06-18 14:43 ` cvs-commit at gcc dot gnu.org [this message] 2021-06-18 14:46 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-100384-4-NMt0L5Ovsc@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).