Expressing range constraints in CNF form

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 12 02:37:53 PDT 2017


On Monday, 12 June 2017 at 07:18:30 UTC, Walter Bright wrote:
> On 6/11/2017 5:13 PM, Adam D. Ruppe wrote:
>>        supportsFront!R &&
>
> That doesn't work because there may be a local symbol:
>
>     T front(R r) { }
>
> which will not be in scope in supportsFront().

That is a problem regardless of the constraint.

Even if we are clever enough to construct the constraint to 
workaround this issue, code that uses such ranges will not 
compile.

-Steve


More information about the Digitalmars-d mailing list