From bd9532a6a4291476f6a4f209f030d8789f2e7a99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sun, 13 Sep 2015 21:50:34 +0200 Subject: [PATCH] Documentation fixes: - core.hpp: hide non-public macros - default_delete.hpp: Hide detail code - unique_ptr.hpp: Likewise - utility_core.hpp: Document move_if_not_lvalue_reference --- include/boost/move/core.hpp | 4 ++++ include/boost/move/default_delete.hpp | 6 ++++++ include/boost/move/unique_ptr.hpp | 4 +++- include/boost/move/utility_core.hpp | 2 ++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/include/boost/move/core.hpp b/include/boost/move/core.hpp index 55486e6..54aece0 100644 --- a/include/boost/move/core.hpp +++ b/include/boost/move/core.hpp @@ -27,6 +27,8 @@ #include #include +// @cond + //boost_move_no_copy_constructor_or_assign typedef //used to detect noncopyable types for other Boost libraries. #if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES) @@ -49,6 +51,8 @@ // #endif //BOOST_NO_CXX11_DELETED_FUNCTIONS +// @endcond + #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) #include diff --git a/include/boost/move/default_delete.hpp b/include/boost/move/default_delete.hpp index afe1b1b..1c26ed9 100644 --- a/include/boost/move/default_delete.hpp +++ b/include/boost/move/default_delete.hpp @@ -31,6 +31,7 @@ //! Describes the default deleter (destruction policy) of unique_ptr: default_delete. namespace boost{ +// @cond namespace move_upd { namespace bmupmu = ::boost::move_upmu; @@ -96,6 +97,7 @@ typedef int bool_conversion::* explicit_bool_arg; #endif } //namespace move_upd { +// @endcond namespace movelib { @@ -123,7 +125,11 @@ struct default_delete #endif #if defined(BOOST_MOVE_DOXYGEN_INVOKED) + //! Trivial copy constructor + //! default_delete(const default_delete&) BOOST_NOEXCEPT = default; + //! Trivial assignment + //! default_delete &operator=(const default_delete&) BOOST_NOEXCEPT = default; #else typedef typename bmupmu::remove_extent::type element_type; diff --git a/include/boost/move/unique_ptr.hpp b/include/boost/move/unique_ptr.hpp index bcf4fae..5b06743 100644 --- a/include/boost/move/unique_ptr.hpp +++ b/include/boost/move/unique_ptr.hpp @@ -38,7 +38,7 @@ //! specially in C++03 compilers: //! - operator < uses pointer operator < instead of std::less. //! This avoids dependencies on std::common_type and std::less -//! (/ headers. In C++03 this avoid pulling Boost.Typeof and other +//! (/ headers). In C++03 this avoid pulling Boost.Typeof and other //! cascading dependencies. As in all Boost platforms operator < on raw pointers and //! other smart pointers provides strict weak ordering in practice this should not be a problem for users. //! - assignable from literal 0 for compilers without nullptr @@ -46,6 +46,7 @@ //! cv-less T and cv-less U are the same type and T is more CV qualified than U. namespace boost{ +// @cond namespace move_upd { //////////////////////////////////////////// @@ -301,6 +302,7 @@ struct enable_up_moveconv_constr {}; } //namespace move_upd { +// @endcond namespace movelib { diff --git a/include/boost/move/utility_core.hpp b/include/boost/move/utility_core.hpp index 89e4f07..7fd1ea1 100644 --- a/include/boost/move/utility_core.hpp +++ b/include/boost/move/utility_core.hpp @@ -265,6 +265,8 @@ #if defined(BOOST_MOVE_DOXYGEN_INVOKED) + //! Effects: Calls `boost::move` if `input_reference` is not a lvalue reference. + //! Otherwise returns the reference template output_reference move_if_not_lvalue_reference(input_reference) noexcept; #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES)