Higher-order C++ type traits