[Issue 13781] Tuple assign should be @nogc

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Dec 14 11:55:10 PST 2014


https://issues.dlang.org/show_bug.cgi?id=13781

Peter Alexander <peter.alexander.au at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter.alexander.au at gmail.co
                   |                            |m
          Component|Phobos                      |DMD

--- Comment #1 from Peter Alexander <peter.alexander.au at gmail.com> ---
Adding @nogc to Tuple.opAssign gives:

Error: @nogc function 'std.typecons.Tuple!(string,
"s").Tuple.opAssign!(Tuple!(string, "s")).opAssign' cannot call non- at nogc
function 'std.algorithm.swap!(Tuple!string).swap'

Adding @nogc to swap makes the code compile.

Both are templates, so @nogc should be inferred. Marking this as a DMD bug.

--


More information about the Digitalmars-d-bugs mailing list