On Monday, 27 June 2016 at 14:19:16 UTC, jmh530 wrote:
On Sunday, 26 June 2016 at 22:32:55 UTC, Walter Bright wrote:
On 6/26/2016 10:18 AM, Enamex wrote:
- template arguments that accept constant values of any type whatsoever
'template<auto Arg>';

Still adding D features, I see!

constexpr if looks a lot like static if to me.

I don't think it is like static if. AFAIK it cannot turn off member fields and it cannot turn off static_asserts. "if constexpr" is primarily for preventing instantiation issues, so it does not introduce a separate compilation stage like in D.

In C++ this will fail to compile:

if constexpr(false){
    static_assert(false);
}

Reply via email to