Date
2016-08-15.00:00:00
Message id
8453

Content

[ 2016-08-07, Daniel reopens ]

With the acceptance of LWG 2598, the proposed wording is invalid code, because it attempts to call std::addressof with an rvalue argument. It should be pointed out that the new restriction caused by 2598 doesn't affect real code, because any identity test within a move assignment operator (or any comparable function) would act on the current function argument, which is an lvalue in the context of the function body. The existing wording form of the issue could still be kept, if a helper variable would be introduced such as:

Let refrv denote a reference initialized as if by const T& refrv = rv;. Then if addressof(t) != addressof(refrv), t is equivalent to the value of rv before the assignment

But it seems to me that the same effect could be much easier realized by replacing the code form by a non-code English phrase that realizes the same effect.