On Sunday, 9 October 2016 at 21:32:23 UTC, ag0aep6g wrote:
On 10/09/2016 10:57 PM, jython234 wrote:
1. Where do I use the "shared" keyword?

What doesn't work is creating an unshared object of a class that only has a shared constructor. To create both shared and unshared objects, you need either two constructors or a `pure` one.

    class C
    {
        this() pure {}
    }
    void main()
    {
        auto u = new C; /* works */
        auto s = new shared C; /* too */
    }



Why this ins't in doc? :O I didn't know about using pure in this way.

Reply via email to