Skip to content

Instantly share code, notes, and snippets.

@rikkimax
Created March 12, 2014 05:10
Show Gist options
  • Save rikkimax/9501225 to your computer and use it in GitHub Desktop.
Save rikkimax/9501225 to your computer and use it in GitHub Desktop.
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