On 08/30/2018 04:27 PM, Jason Merrill wrote:
On Thu, Aug 30, 2018 at 3:31 PM, Julian Brown <jul...@codesourcery.com> wrote:
"Apart from parsing, it's necessary to prevent the "cannot take the
address of 'this', which is an rvalue expression" error from appearing
Breaking a rather fundamental language attribute does not seem wise.
Why does referring to this[0:1] require making 'this' addressable?
Surely what we're interested in is the value of 'this', not the
address.
Yes, transferring the this pointer is very unlikely to be what the user
wants -- the object being referred to contains the data. It might be
wise to look at the DR's and changes relating to lambdas and this
capture. Those changes now make it much harder to simply capture the
pointer unintentionally.
nathan
--
Nathan Sidwell