geza
geza

Reputation: 29962

Is it possible to create a better version of `std::min` & `std::max`?

With the new features of C++17, is it possible to create a better std::min and std::max?

What I mean by better:

I'd like to have a better implementation, which:

Is it possible to do this, or is std::min/max the current best solution which one can have?

Upvotes: 0

Views: 551

Answers (1)

Howard Hinnant
Howard Hinnant

Reputation: 218900

Here's an old and failed proposal for a better min/max using just C++11 tech:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2199.html

Upvotes: 5

Related Questions