[Lldb-commits] [lldb] 0d5fc82 - [lldb] Eliminate unneeded value parameters in Utility (NFC)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 24 00:27:33 PDT 2020
On 23/07/2020 18:24, Adrian Prantl wrote:
> Is there some clever C++ way to prohibit taking an object's address (similar to how you can delete a copy constructor)?
>
> -- adrian
You could =delete the address-of operator, but redefining unary & is
generally frowned upon and I am not sure it will achieve what you want
-- it would not prevent anyone from binding a reference to an existing
object.
I don't think there's any way to prevent that, and even if it were, it
would likely break too much generic code which expects to accept objects
by const&.
pl
More information about the lldb-commits
mailing list