From 6c1db51aba968116dfafbc4b0463b30cb613c78a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sun, 4 Aug 2024 01:41:59 +0200 Subject: [PATCH] Improve offset_ptr doxygen documentation hidding enable_if parameter for convertible pointers and fixing some typos. --- include/boost/interprocess/offset_ptr.hpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/include/boost/interprocess/offset_ptr.hpp b/include/boost/interprocess/offset_ptr.hpp index dcae467..8b4e8df 100644 --- a/include/boost/interprocess/offset_ptr.hpp +++ b/include/boost/interprocess/offset_ptr.hpp @@ -319,15 +319,18 @@ class offset_ptr {} #endif //BOOST_NO_CXX11_NULLPTR - //!Constructor from other pointer. + //!Constructor from raw pointer. Only takes part in overload resolution if T* is convertible to PointedType* //!Never throws. template BOOST_INTERPROCESS_FORCEINLINE offset_ptr( T *ptr - , typename ipcdetail::enable_if< ::boost::move_detail::is_convertible >::type * = 0) BOOST_NOEXCEPT + #ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED + , typename ipcdetail::enable_if< ::boost::move_detail::is_convertible >::type * = 0 + #endif + ) BOOST_NOEXCEPT : internal(ipcdetail::offset_ptr_to_offset(static_cast(ptr), this)) {} - //!Constructor from other offset_ptr + //!Constructor from other offset_ptr. //!Never throws. BOOST_INTERPROCESS_FORCEINLINE offset_ptr(const offset_ptr& ptr) BOOST_NOEXCEPT : internal(ipcdetail::offset_ptr_to_offset_from_other(this, &ptr, ptr.internal.m_offset)) @@ -435,8 +438,9 @@ class offset_ptr } #endif //BOOST_NO_CXX11_NULLPTR - //!Assignment from related offset_ptr. If pointers of pointee types - //! are assignable, offset_ptrs will be assignable. Never throws. + //!Assignment from related offset_ptr. + //!Only takes part in overload resolution if T2* is convertible to PointedType* + //!Never throws. template BOOST_INTERPROCESS_FORCEINLINE #ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED typename ipcdetail::enable_if_c