Created
June 18, 2017 08:35
-
-
Save ScatteredRay/327cdf4d32ee6348fcb71ef622a4e324 to your computer and use it in GitHub Desktop.
Template partial specialization.
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
template <typename T, typename = void> | |
struct Foo; | |
// A | |
template <typename T> | |
struct Foo<unique_ptr<T>, typename std::enable_if<std::is_class<T>::value>::type> {...}; | |
// B | |
template <typename T> | |
struct Foo<T, typename std::enable_if<std::is_class<T>::value>::type> {...}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment