W
werasm
Hi all,
This code failed to compile (using GCC 4.1). Other compilers did not
complain.
template <class T>
struct Base
{
Base( T& ){}
};
struct Derived : Base<Derived>
{
Derived()
: Base( *this ) <<---Error here!
{}
};
GCC failed with error:
error: no matching function for call to
`appCFDC::Base<appCFDC:erived>::Base()'
The problem is fixed by qualifying the Base type explicitly:
: Base<Derived>( *this )...
Is GCC at fault here? Anybody willing to sight the standard?
Kind regards,
Werner
This code failed to compile (using GCC 4.1). Other compilers did not
complain.
template <class T>
struct Base
{
Base( T& ){}
};
struct Derived : Base<Derived>
{
Derived()
: Base( *this ) <<---Error here!
{}
};
GCC failed with error:
error: no matching function for call to
`appCFDC::Base<appCFDC:erived>::Base()'
The problem is fixed by qualifying the Base type explicitly:
: Base<Derived>( *this )...
Is GCC at fault here? Anybody willing to sight the standard?
Kind regards,
Werner