0

Just a code sample:

template <typename E> class TypeWrapper
{
protected:
  template <typename O> void m_add_object()
  {
  }
};


template <class T> class PyType: public TypeWrapper<T>
{
  void call()
  {
    TypeWrapper<T>::m_add_object<PyType<T> >();
  }
};

It's a part of a large project, as small as possible. All templates used and required.

This code invariably failed to compile with reason:

error: expected primary-expression before ‘>’ token

I tried to fully qualify all members and to use typename keyword. It doesn't help. I think there is invisible cyclic dependency or compiler bug?

My environment: gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1); Ubuntu 14.04.1 LTS

dyomas
  • 700
  • 5
  • 13

0 Answers0