Skip to content

Instantly share code, notes, and snippets.

@picanumber
Last active November 23, 2016 00:15
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 picanumber/893d8d349e22d7c166c735313ad971d2 to your computer and use it in GitHub Desktop.
Save picanumber/893d8d349e22d7c166c735313ad971d2 to your computer and use it in GitHub Desktop.
struct Max
{
template <class T1, class T2>
constexpr decltype(auto) operator()(T1&& lhs, T2&& rhs)
{
return lhs > rhs ? std::forward<T1>(lhs) : std::forward<T2>(rhs);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment