Book a Demo

Author Topic: C++ Template class import  (Read 2205 times)

Trigve

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • End of the world was as expected...
    • View Profile
C++ Template class import
« on: January 22, 2007, 01:56:31 am »
Hi,

I have a problem when importing template class in C++:
Code: [Select]

template <class T>
class SomeClass
{
  // ... some members
  template<typename R>
  R getAttribute(T Attribute);
}

template<class T>
template<typename R>
R SomeClass<T>::getAttribute(T Attribute)
{
  // ... some def
}



Error is show in line "R SomeClass<T>::getAttribute(T Attribute)" unexpected symbol R

It works fine if method is inlined.

thanks

Trigve
« Last Edit: January 22, 2007, 01:57:16 am by Trigve »