public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/10646: [3.3/3.4 regression] non-const reference is incorrectly matched in a "const T" partial specialization
@ 2003-05-07 0:26 Giovanni Bajo
0 siblings, 0 replies; 2+ messages in thread
From: Giovanni Bajo @ 2003-05-07 0:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/10646; it has been noted by GNATS.
From: "Giovanni Bajo" <giovannibajo@libero.it>
To: <gcc-gnats@gcc.gnu.org>,
<gcc-bugs@gcc.gnu.org>,
<notbob@tessellation.com>,
<nobody@gcc.gnu.org>,
<gcc-prs@gcc.gnu.org>
Cc:
Subject: Re: c++/10646: [3.3/3.4 regression] non-const reference is incorrectly matched in a "const T" partial specialization
Date: Wed, 7 May 2003 02:23:22 +0200
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10646
As an additional note, the same bug exists for any combination of
cv-qualifier. So, you can construct a template called is_volatile like the
above to reproduce the same bug.
Giovanni Bajo
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c++/10646: [3.3/3.4 regression] non-const reference is incorrectly matched in a "const T" partial specialization
@ 2003-05-07 0:17 giovannibajo
0 siblings, 0 replies; 2+ messages in thread
From: giovannibajo @ 2003-05-07 0:17 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, notbob
Old Synopsis: is_const<T> treats references and functions as const
New Synopsis: [3.3/3.4 regression] non-const reference is incorrectly matched in a "const T" partial specialization
State-Changed-From-To: open->analyzed
State-Changed-By: bajo
State-Changed-When: Wed May 7 00:17:50 2003
State-Changed-Why:
The bug for function types is confirmed in 3.2 but it's
fixed in 3.3 (20030503) and 3.4 (20030503). It might be
fixed in 3.2.3 as well, I don't have that version.
There still is a bug with references, though:
---------------------------------
template <typename T>
struct is_const
{
typedef int type;
};
template <typename T>
struct is_const<const T>
{};
is_const<bool&>::type a;
---------------------------------
This should compile (but I'm not 100% sure because this
very part of the standard is still a bit misterious for me),
and it does on MSVC71 and Comeau/EDG, but fails with GCC
3.3 and 3.4. Since it worked in 2.95, I rate this as a
regression.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10646
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-05-07 0:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-07 0:26 c++/10646: [3.3/3.4 regression] non-const reference is incorrectly matched in a "const T" partial specialization Giovanni Bajo
-- strict thread matches above, loose matches on Subject: below --
2003-05-07 0:17 giovannibajo
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).