c++/253: Re: `foo' is not a member of type `test<int>'...but it is!!
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Sat May 27 09:46:00 GMT 2000
>Number: 253
>Category: c++
>Synopsis: `foo' is not a member of type `test<int>'...but it is!!
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: analyzed
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Sat May 27 09:46:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: "Marc Guiot" <mguiod@nortelnetworks.com>
>Release: 2.95.2
>Organization:
Nortel Networks
>Environment:
>Description:
Original-Message-ID: <39255DA9.8A9B82D1@europem01.nt.com>
Date: Fri, 19 May 2000 17:28:41 +0200
The version of g++ 2.96 (as the last night version) say :
testGcc2.cc: In instantiation of `test<int>':
testGcc2.cc:24: instantiated from here
testGcc2.cc:19: `foo' is not a member of type `test<int>'
testGcc2.cc:19: template argument 2 is invalid
Is it illegal or a bug? (Sunpro CC5.0 assert)
template <class T, void (T::*f)()>
class CALL
{
public :
void call(T *t)
{
(t->*f)();
}
};
template <class T>
class test
{
public :
void foo()
{
}
CALL<test<T>, &test<T>::foo> c;
};
int main()
{
test<int> te;
}
--
: Linux/C++ user :
: looking for the QWAN :
Marc Guiot du Doignon
marc.guiot@design-up.com
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-prs
mailing list