Expressing range constraints in CNF form
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 12 06:48:16 PDT 2017
On 06/12/2017 03:18 AM, 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().
Yah, this was part of the original design: migrate all checks to
std.traits. At a point I realized that queries of the form "does a.b
work?" need to be accompanied by passing a number of modules to import
in order to resolve possible UFCS for "b". At the moment I had a
standard library artifact import a user-defined module, I decided things
got too odd and gave up on that. -- Andrei
More information about the Digitalmars-d
mailing list