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
  • 106,671
  • 19
  • 240
  • 328
Quest
  • 2,764
  • 1
  • 22
  • 44

0 Answers0