On 01/20/2017 08:45 AM, Jason Merrill wrote:
Hmm, I would guess that if we're going to do this we need to also use forward_parm in maybe_thunk_body.
Apparently not needed. maybe_thunk_body is called after we've genericized the parent ctor. That ctor's parms have been bashed to reference and have DECL_BY_REFERENCE set appropriately. The clone's parms have also been bashed, but do not have DECL_BY_REFERENCE set.
For POD struct (which remain as struct T) the backend machinery already DTRT.
nathan -- Nathan Sidwell