[Bug c++/11289] New: g++ don't recognize static template-member
dimfair at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Mon Jun 23 10:38:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11289
Summary: g++ don't recognize static template-member
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dimfair at yahoo dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
g++ don't recognize static template-member of class which is given as template
parameter. See example:
-------------
#include <stdio.h>
class A
{
public:
template<int _m> static void func(int a) { printf("A::func<%d>(%d)\n", _m, a); }
};
template<class T>
class B
{
public:
static void func2(int a) { printf("B::func(%d): ", a); T::func<1>(3); }
};
int main()
{
B<A>::func2(2);
return 0;
}
-------------
More information about the Gcc-bugs
mailing list