Why can't we derive struct's? (Hansel & Gretel)

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Dec 28 01:08:00 UTC 2018


On Fri, Dec 28, 2018 at 12:50:11AM +0000, luckoverthere via Digitalmars-d wrote:
[...]
> struct C {
>     A a_;
>     B b_;
>     int c;
> 
>     alias a_ this;
>     alias b_ this;
> }
[...]

Compiler output:

	Error: there can be only one alias this

Nope, still no multiple alias this. :-D


T

-- 
Designer clothes: how to cover less by paying more.


More information about the Digitalmars-d mailing list