static opCall 'hidden' by incompatible constructors
Nick Treleaven via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 18 04:45:25 PDT 2014
On 17/07/2014 18:58, Dicebot wrote:
> (for Unique probably disabling default constructor makes most sense)
I'm not sure about that, default construction is useful to be able to
delay resource creation:
Unique!S u1;
...
u1 = unique!S(); // factory function
To allow that but disallow Unique!S(), maybe we'd need this:
@disable static opCall();
(That doesn't compile ATM).
More information about the Digitalmars-d
mailing list