D 2015/2016 Vision?
Marc Schütz via Digitalmars-d
digitalmars-d at puremagic.com
Wed Oct 7 04:27:47 PDT 2015
On Wednesday, 7 October 2015 at 10:03:44 UTC, Namespace wrote:
> Because there is no guarantee that others, who use your code,
> get it right and use those constructs.
The obvious way would be to make the constructor private and only
provide a factory method returning a Scoped!Texture2D. I just
tried that, but ran into problems with the construction (probably
a bug in emplace). Don't have time to investigate this now. Maybe
you can also return a Unique!Texture2D, but that one doesn't have
an alias this...
More information about the Digitalmars-d
mailing list