S
Staffan Langin
Hello,
In the following code-snippet,
template<class Base>
class Foo : public Base
{
typedef typename Base::Type Type; //1
Type FooBar();
};
template<class Base> typename Foo<Base>::Type //2
Foo<Base>::FooBar()
{
return 0;
}
struct Bar {typedef int Type;};
template class Foo<Bar>;
The C++ standard requires the typename at 1 but not at 2. However, the
compiler included in Visual Studio 2005 also requires typename at 2
resulting in a LOT of errors in my current project. Is this a known problem
that is scheduled to be fixed in the release version of VS2005?
Staffan Langin
In the following code-snippet,
template<class Base>
class Foo : public Base
{
typedef typename Base::Type Type; //1
Type FooBar();
};
template<class Base> typename Foo<Base>::Type //2
Foo<Base>::FooBar()
{
return 0;
}
struct Bar {typedef int Type;};
template class Foo<Bar>;
The C++ standard requires the typename at 1 but not at 2. However, the
compiler included in Visual Studio 2005 also requires typename at 2
resulting in a LOT of errors in my current project. Is this a known problem
that is scheduled to be fixed in the release version of VS2005?
Staffan Langin