class A{
int i;
bool b;
alias i this;
alias b this;
}
void main()
{
auto a = new A;
int i = a;
bool b = a;
}
--- this will not compile in dmd 2068.1.
--- ok, but what technique do you use to emulate this type of
behavior??
--- would interfaces be the answer, if so could I see an
On Thursday, September 24, 2015 13:04:20 steven kladitis via
Digitalmars-d-learn wrote:
> class A{
>int i;
>bool b;
>alias i this;
>alias b this;
> }
>
> void main()
> {
>auto a = new A;
>int i = a;
>bool b = a;
> }
>
> --- this will not compile in dmd 2068.1.
> ---