template <typename T>
struct TestClass {
template <typename R>
R do_somethign(T v) const { return v; }
};
template <typename S, typename R>
R call_test_class(const TestClass<S>& v) {
return v.do_somethign<R>(5); // << здесь он ругается
}
void use_my_test_class() {
TestClass<int> c1;
call_test_class<int,int>(c1);
}
выдает ошибку:
expected primary-expression before '>' token
return v.do_somethign<R>(5);
^
компилирую на QtCreator.