Re:A brief guide to C++ template metaprogramming
by TickleSteve on Sunday September 25, 2016 @11:15AM
(#12575672)
agree... the example is terrible, attempting to wrap c functions like this gives you nothing but added complexity.
Additionally, the author implements count in the worst way possible, it's highly inefficient and it will result in very long compilation time. You don't need to do tail recursion, you can just write:
template <class... T> using count = std::integral_constant<std::size_t, sizeof...(T)>;
Such errors make me uncomfortable as it seems the author isn't up to date on the topic. A+ for intent though.