Count your blessings!

BCS ao at pathlink.com
Thu Jun 11 09:52:18 PDT 2009


Reply to bearophile,

> Andrei Alexandrescu:
> 
>> I guess this would work better:
>> CommonType!(Tx, Ty) lazyOr(Tx, Ty)(Tx x, lazy Ty y) { ... }
> What's the improvement?

class C {}
class D1 : C {}
class D2 : C {}

D1 d1;
D2 d2;

auto r = lazyOr(d1, d2);

> (And I think that code of mine gives a better error message.)
> Bye,
> bearophile





More information about the Digitalmars-d mailing list