C++ Template Meta Programming: Different Behavior using Types Aliases vs Inheritance
问题 I was trying to reverse a c++14 std::index_sequence and ran into problems with my original implementation that used inheritance. I found a workaround using local type aliases, but I would like to understand why the original code does not work. Broken Reverse Using Inheritance This was my first attempt at reversing a std::index_sequence : /// Helper class that appends an element onto an index_sequence. /// Base case. template<size_t, typename> struct Append : std::index_sequence<> { };