diff options
Diffstat (limited to 'include/vcl/vclptr.hxx')
-rw-r--r-- | include/vcl/vclptr.hxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx index ad7d1e20d9eb..c1b1fb656926 100644 --- a/include/vcl/vclptr.hxx +++ b/include/vcl/vclptr.hxx @@ -223,6 +223,14 @@ public: { return (m_rInnerRef > handle.m_rInnerRef); } + + /** Deleted address-of operator. + + To avoid confusion whether it returns the address of either the + pointed-to raw object (for which to use VclPtr::get instead) or the + wrapper itself (for which to use std::addressof instead). + */ + void operator &() = delete; }; // class VclPtr template<typename T1, typename T2> |