Skip to content

Instantly share code, notes, and snippets.

@loliGothicK
Created April 12, 2018 18:18
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 loliGothicK/d77e22464bfb35f3d390ed71526a8bd3 to your computer and use it in GitHub Desktop.
Save loliGothicK/d77e22464bfb35f3d390ed71526a8bd3 to your computer and use it in GitHub Desktop.
int main(){
auto twice = [](int n){ return n*2; };
constexpr int (*func_pointer_to_twice)(int) = twice;
static_assert(func_pointer_to_twice(2) == 4);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment