Created
March 12, 2014 05:10
-
-
Save rikkimax/9501225 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
T mul(T)(T x, T y) { | |
return x * y; | |
} | |
void test(size_t function(size_t x, size_t y) mul) { | |
assert(mul(2, 2) == 4); | |
} | |
void main() { | |
test(&mul!size_t); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment