class dataGridLayerView{
int t;
this(int _t){
t = _t;
}
}
class myClass{
dataGridLayerView dataGrid;
this()
{
dataGrid = new auto(15); // <--- new
// instead of
dataGrid = new dataGridLayerView(15);
}
}
Because it seems, conceptually, the compiler should know all the details required here to simply insert the right constructor name. Basically just the reverse of:
auto t = sqrt(15);
So intuitively it makes sense to me.
It might even be possible to write a mixin to do this, I'm not sure.
I'm no D wizard, but I don't see any obvious name or lexing conflicts/ambiguity.
Cheers,
--Chris