S
siddhu
Hello,
would you suggest to me, why gcc 3.3.3 can not compile this:
template<class T>
class Base
{
Base(){}
friend T;
};
class A:virtual public Base<A>
{
public:
A(){}
};
# g++ test.cpp
test.cpp:6: error: template parameters cannot be friends
while CC,MS VisualC++, gcc 2.95 do.
Does it conflict with C++ standard?
How can i change code to produce such behaviour? I need to use
template
Thank you.
would you suggest to me, why gcc 3.3.3 can not compile this:
template<class T>
class Base
{
Base(){}
friend T;
};
class A:virtual public Base<A>
{
public:
A(){}
};
# g++ test.cpp
test.cpp:6: error: template parameters cannot be friends
while CC,MS VisualC++, gcc 2.95 do.
Does it conflict with C++ standard?
How can i change code to produce such behaviour? I need to use
template
Thank you.