17 Feb
2018
17 Feb
'18
7:01 p.m.
On Sat, Feb 17, 2018 at 9:32 AM, Peter Dimov via Boost < boost@lists.boost.org> wrote:
Zach Laine wrote:
It's not quite as nice as using std::max() as you wrote previously,
because of course std::max() is not yet constexpr.
It is, but only under C++17.
I hadn't noticed. I sort of assumed that it was getting added along with all the algorithms constexpr-fied for C++20 in Albuquerque. According to cppreference, it's been constexpr since C++14. Anyway, I can't get the compiler to treat the result of get_arity as a constant expression using std::max, even in C++17 mode with a recent-ish Clang, so I'm leaving the example as-is for now. Zach