Skip to content

Instantly share code, notes, and snippets.

@motonacciu
Created July 25, 2012 14:55
Show Gist options
  • Select an option

  • Save motonacciu/3176599 to your computer and use it in GitHub Desktop.

Select an option

Save motonacciu/3176599 to your computer and use it in GitHub Desktop.
typedef int (*AbsTy)(int);
Reduction<std::plus<int>,AbsTy,AbsTy> r(std::plus<int>(), &abs, &abs);
r(-10, 5); // => 15
r(-2, -4); // => 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment