I found this example on 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> {}; // OK: first parameter is deducible
I have errors while compiling it with -std=c++11 and -std=c++14
How to compile this? Or maybe example is wrong?
error: template argument ‘(I * 2)’ involves template parameter(s)
template <int I> struct B<I, I*2, 2> {}; // OK: first parameter is deducible