I found this example at http://en.cppreference.com/w/cpp/language/partial_specialization
template <int I, int J, int K> struct B {};
template <int I> struct B<I, I*2, 2> {};
I have errors compiling with -std = c ++ 11 and -std = c ++ 14
How to compile this? Or maybe the example is wrong?
error: template argument ‘(I * 2)’ involves template parameter(s)
template <int I> struct B<I, I*2, 2> {};
source
share