c++/7165: Static template member functions causes parse error when accessed from template class
kv@daimi.au.dk
kv@daimi.au.dk
Sat Jun 29 13:31:00 GMT 2002
>Number: 7165
>Category: c++
>Synopsis: Static template member functions causes parse error when accessed from template class
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jun 29 10:16:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Kristoffer Vinther
>Release: g++ (GCC) 3.1
>Organization:
>Environment:
RedHat Linux 7.3 on an Intel Mencindo
>Description:
Static template member functions causes parse error when accessed from template class.
>How-To-Repeat:
class A
{
public:
template<class T>
static T g()
{ return T(); }
};
template<class T, typename TA = A>
class B
{
public:
B() : t(TA::g<T>())
{ }
T t;
};
int main(int argc, char** argv)
{
int p = A::g<int>();
B<int> d;
}
>Fix:
Unknown!
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list