one more function template bug in VC 2003

F

Fender Mussel

Please could someone verify if this bug is fixed in VS 2005? (the code
should compile, but it doesn't in VC 2003)

Thanks, Stefan


template <typename DerivedT>
struct base
{
template <typename T>
DerivedT f (T const&) const
{
return DerivedT();
}
};

struct derived : public base<derived>
{
};

derived d;


// error C2027: use of undefined type 'derived'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top