Created
February 10, 2016 14:03
-
-
Save jonathan-beard/aac265acc2ff58ee0dd1 to your computer and use it in GitHub Desktop.
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
/** enable if type you want to re-use mult. times **/ | |
template < class T > using OBJENABLE = typename std::enable_if< | |
std::is_object< T >::value && ! | |
std::is_fundamental< T >::value >::type; | |
/** re-use multiple times **/ | |
template < class T, OBJENABLE< T >* = nullptr /** if null don't instantiate **/ > | |
void do_it( const T &t ) | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Must be c++XX, where XX >= 11