Last active
August 29, 2015 14:13
-
-
Save beached/3eb77890f0fda77bac99 to your computer and use it in GitHub Desktop.
Succinct way of mixing several type traits to create new one
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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