Код: Выделить всё
#include
template<
template
class SumPolicy
>
int Function(){
typedef SumPolicy P;
return P::get();
}
template
class Container{
public:
template
class ImplPolicy{
public:
static T get(){
return X + N;
}
};
};
template
void TestFunc(){
//int x = Function();
//test.cpp|27 col 36 error| clang:Error:template_missing_args:Use of class template 'ImplPolicy' requires template arguments
//
int x = Function(); // Ok
}
int main(){
TestFunc();
return 0;
}
нет.
Код: Выделить всё
int x = Function();
Код: Выделить всё
int x = Function();
Подробнее здесь: https://stackoverflow.com/questions/798 ... ument-in-c