D-Programming-Language/phobos — pull request #1826 by monarchdodra (2013-12-31 16:21:27+00:00)
Title: fix Issue 11853 - Tuples fail "isAssignable"

Very ugly fix for https://d.puremagic.com/issues/show_bug.cgi?id=11853

Basically, Tuple's opAssign calls swap, but swap needs to know tuples are assignable => circular dependency and dmd confusion.

This hackish solution short-circuits the problem by simply checking first the mere presence of an elaborate assign.

There is still some smell, you can read more about it in the bug report, but in the mean time, this is a very low cost fix (and more optimal in general, testing existence is cheaper than testing if something compiles).