c++/7725: g++ cannot convert 0 to int* as template arg.
zyzstar@uid0.sk
zyzstar@uid0.sk
Mon Aug 26 06:56:00 GMT 2002
>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:
More information about the Gcc-bugs
mailing list