On Sunday, 11 June 2017 at 15:25:11 UTC, Andrei Alexandrescu wrote:

// Also possible (no change to the language)
enum bool isInputRange(R) =
    is(typeof((ref R r) => r)) && msg("must be copyable")
&& is(ReturnType!((R r) => r.empty) == bool) && msg("must support bool empty") && is(typeof(lvalueOf!R.front)) && msg("must support front") && is(typeof(lvalueOf!R.popFront)) && msg("must support back");

This would be a very nice change, but this syntax feels more natural to me:

is(ReturnType!((R r) => r.empty) == bool, "must support bool empty")


Reply via email to