0

I have the following piece of code:

struct TypeStruct
{
    typedef int type;
};

template<typename T>
class Base
{
public:
    typedef T::type type;
//          ^ this line gives compiler error
};

class Derived final :
    public Base<TypeStruct>
{

};

I've tried everything, searched on MSDN, without success. I really don't know what's going on. Any help is appreciated.

Praetorian
  • 103,386
  • 18
  • 232
  • 318
Quest
  • 2,628
  • 1
  • 19
  • 41

0 Answers0