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 c++/99103] Initializer-list constructors in CTAD for vector is still wrong Date: Thu, 25 Feb 2021 21:39:05 +0000 [thread overview] Message-ID: <bug-99103-4-vejjiIGtRJ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99103-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99103 --- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:676f6f3277181662cf3ed07769edfa2d4fb7df28 commit r11-7405-g676f6f3277181662cf3ed07769edfa2d4fb7df28 Author: Patrick Palka <ppalka@redhat.com> Date: Thu Feb 25 16:38:08 2021 -0500 c++: Fix CTAD of single-element initializer list [PR99103] When determining whether to rule out initializer-list constructors during CTAD with a single-element initializer list (as per P0702), the element type's cv-qualifiers should be irrelevant. This patch fixes this by making is_spec_or_derived strip cv-qualifiers from the supplied expression type. In passing, I noticed in maybe_aggr_guide we were calling is_spec_or_derived with swapped arguments. This led us to prefer the aggregate deduction candidate over copying deduction in the second testcase below with -std=c++20. gcc/cp/ChangeLog: PR c++/99103 * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'. (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived. gcc/testsuite/ChangeLog: PR c++/99103 * g++.dg/cpp1z/class-deduction79.C: New test. * g++.dg/cpp1z/class-deduction80.C: New test.
next prev parent reply other threads:[~2021-02-25 21:39 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-15 10:57 [Bug c++/99103] New: " oleksandr.koval.dev at gmail dot com 2021-02-15 19:07 ` [Bug c++/99103] " ppalka at gcc dot gnu.org 2021-02-25 21:39 ` cvs-commit at gcc dot gnu.org [this message] 2021-02-25 21:39 ` ppalka 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-99103-4-vejjiIGtRJ@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).