This year, I was impressed by Louis Dionne talk entitled "C Metaprogramming: A Paradigm Shift".
One feature called is_valid that can be found in Louis's Boost. This genious is_valid function heavily rely on an even more "magic" C programming technique coined with the term SFINAE discovered at the end of the previous century.
If this acronym doesn't speak to you, don't be scared, we are going to dive straight in the subject.
Also avoid publisher series, unless the publisher has a true monopoly over the "works" in question. But the Loeb Classical Library is a series of editions, not of works.The solution in C 98 relies on 3 key concepts: overload resolution, SFINAE and the static behavior of sizeof.A simple function call like "f(obj);"" in C activates a mechanism to figure out which f function shoud be called according to the argument obj.The best ability provided by default would be RTTI.Not only RTTI isn't always available, but it also gives you barely more than the current type of the manipulated object.