template parameters cannot be friends

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
would you suggest to me, why gcc 3.3.3 can not compile this:

template<class T>
class Base
{
    friend T;
};

class A:public Base<A>
{
};

# cc test.cpp
test.cpp:6: error: template parameters cannot be friends

while Intel C++, MS VisualC++, gcc 2.95 do.
Does it conflict with C++ standart?
How can i change code to produce such behaviour? (I need eliminate errors like "class A:public Base<B>")
Thank you.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux