A compile error when I write template in c++, hard to understand for me. This is the code
template<typename T>
struct S
{
template<typename U>
static void fun()
{
}
};
template<typename T>
void f()
{
S<T>::fun<int>(); //compile error, excepted primary expression before `int`
}
Aucun commentaire:
Enregistrer un commentaire