On 04/27/2017 04:04 PM, Stanislav Blinov wrote:
On Thursday, 27 April 2017 at 19:57:52 UTC, Andrei Alexandrescu wrote:
https://github.com/dlang/phobos/pull/5355

Andrei

And then we'd probably need INoGCAllocator and ISharedNOGCAllocator...

"shared" is a type qualifier essentially changing the type of the interface, so a separate interface is needed. For @nogc, simple variance is sufficient:

interface A
{
    void fun();
}

class B : A
{
    void fun() @nogc {}
}

That said, there are quite a few functions we should be able to qualify as @nogc from the get-go, e.g. empty, expand, alignment etc. Would you like to try a PR to that effect? Thanks!


Andrei

Reply via email to