@nogc for structs, blocks or modules?
rsw0x via Digitalmars-d
digitalmars-d at puremagic.com
Mon Feb 15 20:09:31 PST 2016
On Tuesday, 16 February 2016 at 03:41:12 UTC, Era Scarecrow wrote:
> On Tuesday, 16 February 2016 at 03:13:48 UTC, maik klein wrote:
>> I just realized that I can't even use @nogc because pretty
>> much nothing in phobos uses @nogc
>
> Or it hasn't been tagged @nogc or based on templates they
> can't be preemptively marked it. I'd think most ranges could be
> @nogc; And recently with some of the toString's being rewritten
> to use ranges instead of allocating memory would be @nogc as
> well.
>
> Many algorithms are probably be @nogc too.
templated constructs aren't tagged @nogc because it's inferred,
tagging them @nogc would impose restrictions on the end user
More information about the Digitalmars-d
mailing list