Skip to content

Instantly share code, notes, and snippets.

@beached
Last active August 29, 2015 14:13
Show Gist options
  • Save beached/3eb77890f0fda77bac99 to your computer and use it in GitHub Desktop.
Save beached/3eb77890f0fda77bac99 to your computer and use it in GitHub Desktop.
Succinct way of mixing several type traits to create new one
#include <type_traits>
template<typename T>
using is_numeric = std::integral_contstant<bool, std::is_integral<T>::value || std::is_floating_point<T>::value>;
template<typename T> using is_numeric_t = typename is_numeric<T>::type;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment