one more function template bug in VC 2003

  • Thread starter Thread starter Fender Mussel
  • Start date Start date
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'
 
Please could someone verify if this bug is fixed in VS 2005? (the code
should compile, but it doesn't in VC 2003)

It's still the same with the VS2005 B1 compiler.

It compiles OK with the Comeau online compiler, so I recommend that
you submit a bug report on this at:

http://lab.msdn.microsoft.com/productfeedback/default.aspx

When you've done so, please reply here with the link to your report
and I'll add a vote to it.

Dave
 

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

Back
Top