On Mon, Jun 3, 2013 at 4:52 PM, Nelson, Clark <span dir="ltr"><<a href="mailto:clark.nelson@intel.com" target="_blank">clark.nelson@intel.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I wanted to get feedback from authors of proposals on macro names to represent their features as soon as possible; I started by turning Tom's list of C++11 features into a table in the same style as what we already have for C++14. (As background, please remember that, to the greatest degree that makes sense, I'm tending to use words from the title of the proposal paper to name the feature-test macro.)<br>
<br>
The title of N2235, by which "constexpr" was introduced into C++, was basically "Generalized Constant Expressions". So the more or less mindless name of the macro might be "__cpp_generalized_constant".<br>
<br>
Whereas N3652, which eliminates the constraints on a constexpr function, is entitled, in part, "Relaxing constraints on constexpr functions"; hence "__cpp_relaxed_constexpr".<br>
<br>
It hardly seems likely that we will want to use the word "generalized" as part of two different macro names regarding constexpr -- but we could conceivably decide that this is a case for changing the value of a macro, instead of defining a new one.<br>
<br>
>From my perspective as an implementer, the change that was voted into C++14 doesn't seem minor or subtle, but I guess opinions might differ.<br>
<br>
Comments?</blockquote><div><br></div><div>I don't think either *generalized* or *relaxed* is sufficiently future-proof. What happens if C++17 generalizes constants further or relaxes more constexpr restrictions? And do we really want people to need to remember which features were "generalized" and which were "relaxed"? More generally, I don't think we should use names which describe a difference between C++ version N and C++ version N+1; instead, we should pick names which describe the features objectively (names which still make sense as features of C++ version aleph_0).</div>
<div><br></div><div>So, some strawman proposals:</div><div><br></div><div>1) For N2235, use __cpp_constexpr (emphasizing the new keyword)</div><div>For N3652, use __cpp_constexpr_statements (emphasizing that this is an extension of __cpp_constexpr, and that the primary change is that it permits almost any statements in constexpr functions)</div>
<div>2) N2235 has #define __cpp_constexpr 1, and N3652 has #define __cpp_constexpr 2.</div><div>3) N2235 has #define __cpp_constexpr 201103L and N3652 has #define __cpp_constexpr 2014xxL.</div></div>