On Tue, 14 Feb 2017 19:08:53 +0000, bachmeier wrote: > I am not familiar with all of the past discussion of this issue, but > something that I have wondered is why we can't do something like > > alias fooConstraint = (s != SwapStrategy.stable > && isBidirectionalRange!Range && hasLvalueElements!Range && > hasLength!Range && Offset.length >= 1); > > Range remove > (SwapStrategy s = SwapStrategy.stable, Range, Offset...) > (Range range, Offset offset) if fooConstraint;
Because now I have to look up the definition of fooConstraint and then I have to look up the definition of each element within it. If the entirety of the constraint is in the body of that helper template, that's a step up from what we have today. But that would involve code duplication, which people tend to dislike.