On Mon, 2 May 2022, 20:44 Edward Catmur, <ecatmur@googlemail.com> wrote:
On Mon, 2 May 2022 at 20:31, Thiago Macieira via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
On Monday, 2 May 2022 12:14:42 PDT Edward Catmur wrote:
> > Unless you add a new type of reference, which we don't want.
>
> An attribute, perhaps. [[no_unique_address]] is precedent for attributes
> affecting ABI.

That is not a good precedent to copy. That should never have been an
attribute.

Also it wouldn't pass Timur's ignorability test (as per P2552R0). So some other mark on the parameter would be necessary.

And further, it would leak into function pointer types. So that's a non starter. 

Library to the rescue: we can't have relocatable function parameters, so use std::optional. Then all we need is a constructor of optional taking a  relocatable parameter, which is much less intrusive on the rest of the language since you can't form a function pointer to a constructor.