Hi all,
I can't compile the following code with Gcc 3.3 (compiles with
CodeWarrior 8):
template <typename T = int>
class Boule
{
friend class Boule<int>;
friend class Boule<float>;
protected:
T _data; // Line #7
inline Boule() {}
template <typename U>
inline Boule(const Boule<U>& b) : _data(b._data) {} // Line # 10
};
template <typename T = int>
class Rouston : protected Boule<T>
{
public:
inline Rouston() {}
template <typename U>
inline Rouston(const Rouston<U>& r) : Boule<T>(static_cast<const
Boule<U>&>(r)) {}
};
The compiler reports the following errors:
Test-2.cpp:7: error: `int Boule<int>::_data' is protected
Test-2.cpp:10: error: within this context
I suspect a bug in the compiler... Is there any workaround ?
Any help welcome !
-------------------------------------------------------------------------
Alexandre Tolmos
E-mail: kt***@free.fr
ICQ: 92964905
-------------------------------------------------------------------------
"Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn."
-------------------------------------------------------------------------