Hi SG10,
"For the library, we will add a specific feature test macros for significant, special features. Otherwise, for those cases where we are just adding constexpr to more things in the library, we will have a dedicated test macro per header and just bump that header-specific macro on each change. That macro will be named __cpp_lib_constexpr_HEADER (with the exception of a few preexisting macros for array and algorithm which have slightly different names)."
But... we actually don't have a __cpp_lib_constexpr_HEADER macro for <algorithm> yet. We *did* have a __cpp_lib_constexpr_swap_algorithms macro... until LWG issue 3256, applied by LWG motion 1 in Belfast, removed it and added a new macro for algorithms:
... with the wrong name. The new macro is called __cpp_lib_constexpr_algorithms, not __cpp_lib_constexpr_algorithm.
Should we rename it again (to remove the "s")? Given that this is a brand-new macro, I don't see any reason to deviate from our policy here.
The proposal for __cpp_lib_constexpr_algorithms is that it covers the additions in P0202 and P0879:
These papers also cover the addition of 'constexpr' to std::swap and std::exchange, which are in <utlility>, not <algorithm>. So I think what we should do is:
Remove __cpp_lib_constexpr_algorithms
Add both __cpp_lib_constexpr_algorithm and __cpp_lib_constexpr_utility, defined to 201703L if the relevant parts of P0202 are implemented, and to 201806L if the relevant parts of both P0202 and P0879 are implemented.