public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c++/7033: [3.3/3.4 regression] [2003-05-30] Partial template specializations accepted even if a template parameter is used in a non-deduced context Date: Tue, 06 May 2003 18:36:00 -0000 [thread overview] Message-ID: <20030506183602.19710.qmail@sources.redhat.com> (raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 2194 bytes --] The following reply was made to PR c++/7033; it has been noted by GNATS. From: Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> To: "Giovanni Bajo" <giovannibajo@libero.it> Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org, Lionel.Champalaune@sophia.inria.fr, Gabriel DOS_REIS <Gabriel.Dos_Reis@sophia.inria.fr> Subject: Re: c++/7033: [3.3/3.4 regression] [2003-05-30] Partial template specializations accepted even if a template parameter is used in a non-deduced context Date: Tue, 06 May 2003 20:34:40 +0200 giovannibajo@libero.it said: > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7033 > The specialization should not be selected because §14.8.2.4p4 clearly > specifies that A<T>::B<Q> is a non-deduced context for both T and Q. > But there's more: I'm confident that defining a partial template > specialization whose arguments can't be fully deduced from the > arguments of the original template is ill-formed. I kindly disagree. First §14.8.2.4p4 deals with "Function template specializations" not with "Class template specializations". The program might be invalid but not for this reason. Second, the specialization can fully be deduced from the template arguments (look again), so that your second affirmation is equally wrong. Both T and V are given in the instanciation. Actually, looking at the standard with Gaby today, it looks like that by §14.5.4.1p1, the unique specialization exactly matched by all the template parameters (which is the case here) should be selected.... I do not definitely claim that the example should compile because I do not know all the arcanes of the standard with this respect, but I have not yet seen an argument that forbids it. And moreover, forbidding this would be extremely surprising for the users without a proper message explaining the reasons for that... -------------------------------------------------------------------- Theodore Papadopoulo Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01 --------------------------------------------------------------------
next reply other threads:[~2003-05-06 18:36 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-05-06 18:36 Theodore Papadopoulo [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-05-06 23:56 Giovanni Bajo 2003-05-05 11:36 Giovanni Bajo 2003-05-05 11:26 Giovanni Bajo
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=20030506183602.19710.qmail@sources.redhat.com \ --to=theodore.papadopoulo@sophia.inria.fr \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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).