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...

Reply via email to