Created
May 31, 2017 15:04
-
-
Save njlr/a41e2278602102030a45471a81d07e4c to your computer and use it in GitHub Desktop.
This file contains hidden or 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<class T> | |
constexpr auto supportsAPI(T x) -> decltype(x.Method1(), x.Method2(), true_type{}) { | |
return {}; | |
} | |
constexpr auto supportsAPI(...) -> false_type { | |
return {}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment