Skip to content

Instantly share code, notes, and snippets.

@cjxgm
Last active Aug 29, 2015
Embed
What would you like to do?
template <class T> constexpr auto is_ptr = false;
template <class T> constexpr auto is_ptr<T*> = true;
int main()
{
static_assert(is_ptr<int*>, "int* must be ptr");
static_assert(!is_ptr<int>, "int must not be ptr");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment