От: | _NN_ | www.nemerleweb.com | |
Дата: | 06.08.13 19:53 | ||
Оценка: | 37 (2) |
template<typename... T>
struct caller
{
template<T... F>
static void f()
{
}
};
int main()
{
caller<int>::f<1>();
}
+ g++ -std=c++11 -O2 -Wall -pedantic -pthread main.cpp
main.cpp: In function ‘int main()’:
main.cpp:13:13: error: no matching function for call to ‘caller<int>::f()’
c::f<1>();
^
main.cpp:13:13: note: candidate is:
main.cpp:5:17: note: template<T ...F> static void caller<T>::f() [with T ...F = {F ...}; T = {int}]
static void f()
^
main.cpp:5:17: note: template argument deduction/substitution failed:
main.cpp:13:13: note: invalid template non-type parameter
c::f<1>();
template<typename... T>
struct caller
{
static void f(T... F)
{
}
};
int main()
{
caller<int>::f(1);
}
struct caller
{
template<T... F>
struct inner
{
static void f()
{
}
};
};
int main()
{
caller<int>::inner<1>::f();
}