This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
`foo' is not a member of type `test<int>'...but it is!!
- To: gcc-bugs at gcc dot gnu dot org
- Subject: `foo' is not a member of type `test<int>'...but it is!!
- From: "Marc Guiot" <mguiod at nortelnetworks dot com>
- Date: Fri, 19 May 2000 17:28:41 +0200
- Organization: Nortel Networks
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