public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/7725: g++ cannot convert 0 to int* as template arg.
@ 2002-08-26 16:06 nathan
0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2002-08-26 16:06 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, zyzstar
Synopsis: g++ cannot convert 0 to int* as template arg.
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Mon Aug 26 12:29:23 2002
State-Changed-Why:
not a bug. this is the correct behaviour. See [14.2.3]/1
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7725
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/7725: g++ cannot convert 0 to int* as template arg.
@ 2002-08-26 7:16 zyzstar
0 siblings, 0 replies; 2+ messages in thread
From: zyzstar @ 2002-08-26 7:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 7725
>Category: c++
>Synopsis: g++ cannot convert 0 to int* as template arg.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Mon Aug 26 06:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: zyzstar@uid0.sk
>Release: g++-3.1.1
>Organization:
>Environment:
>Description:
template <int* P>
class C
{
public:
C() :p(P) {}
~C() {}
int* p;
};
int main()
{
C<0> c;
return 0;
}
This code does not work.
g++ does not accept 0 as a valid
template parameter for pointers.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-26 19:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-26 16:06 c++/7725: g++ cannot convert 0 to int* as template arg nathan
-- strict thread matches above, loose matches on Subject: below --
2002-08-26 7:16 zyzstar
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).