Created
April 12, 2018 18:18
-
-
Save loliGothicK/d77e22464bfb35f3d390ed71526a8bd3 to your computer and use it in GitHub Desktop.
This file contains 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
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