Skip to content

Instantly share code, notes, and snippets.

@cjxgm
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjxgm/bb8e80a0d1d4e57b645c to your computer and use it in GitHub Desktop.
Save cjxgm/bb8e80a0d1d4e57b645c to your computer and use it in GitHub Desktop.
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