DIP66 1.2 (Multiple) alias this. Continuation of work.

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Mon May 25 15:32:54 PDT 2015


On 03/29/2015 07:34 PM, IgorStepanov wrote:
>
> 3. is(T: B) should raise an error if there are many ways to convert T to B.

This is inconsistent with how 'is' works otherwise, and it breaks 
template constraints in annoying ways. (There is no SFINAE.)

auto foo()()if(true){ return 1; } // this is the one you want
auto foo()()if(a){ return 2; }    // this is the one with is(T: B)

void main(){
     foo(); // error
}

Is the intention that no types with multiple alias this paths to some 
type should be defined in the first place?


More information about the Digitalmars-d mailing list