D-Programming-Language/phobos — pull request #2800 by Poita (2014-12-15 20:39:57+00:00)
Title: Fix Issue 13781 - Tuple assign should be @nogc

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

@9rnsr explains why Tuple.opAssign isn't deduced to be @nogc:

"'swap' is used from the opAssign template function in Tuple, but swap checks (hasElaborateAssign!T || !isAssignable!T) and it would see the signature of T.opAssign. On mutual function calls, attributes are inferred as non-@nogc by default. It's a design so this is not a compiler bug.

The correct fix is to mark std.algorithm.swap function as @nogc."