How to deduce types by template integers in C++
I have code: template<int I, typename = void> struct indexed_type { using type = void; indexed_type() { std::cout << "I is void: " << I << std::endl; } }; template<int I> struct indexed_type<I, typename std::enable_if<I == 1, char>::type> { using type = char; indexed_type() { std::cout << "I is char: " << I << std::endl;… Read More How to deduce types by template integers in C++