Skip to content

Instantly share code, notes, and snippets.

@njlr
Created May 31, 2017 15:04
Show Gist options
  • Save njlr/a41e2278602102030a45471a81d07e4c to your computer and use it in GitHub Desktop.
Save njlr/a41e2278602102030a45471a81d07e4c to your computer and use it in GitHub Desktop.
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