From ab26b0b6fdb25ebf90c86b816b5c885066dda10b Mon Sep 17 00:00:00 2001 From: Anton Karpov Date: Wed, 5 Aug 2026 06:20:02 +0300 Subject: [PATCH] Fix @param names in synchronized_value Two things in one file. The lock pointer constructors spell the first parameter val, while every comment above them says value. The name is not consistent in the file itself: unique_lock_ptr takes value in the three tag constructors and val in the plain one, so the comments happen to be right in half the cases and wrong in the other half. Comments now follow the code in each place. The third argument of the tag constructors has no name, and Doxygen cannot attach a @param to an unnamed parameter. Naming it would go against the style of the file, so those lines became @note instead. --- include/boost/thread/synchronized_value.hpp | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/include/boost/thread/synchronized_value.hpp b/include/boost/thread/synchronized_value.hpp index 4e48a853d..d30c64101 100644 --- a/include/boost/thread/synchronized_value.hpp +++ b/include/boost/thread/synchronized_value.hpp @@ -59,7 +59,7 @@ namespace boost BOOST_THREAD_MOVABLE_ONLY( const_strict_lock_ptr ) /** - * @param value constant reference of the value to protect. + * @param val constant reference of the value to protect. * @param mtx reference to the mutex used to protect the value. * @effects locks the mutex @c mtx, stores a reference to it and to the value type @c value. */ @@ -116,7 +116,7 @@ namespace boost BOOST_THREAD_MOVABLE_ONLY( strict_lock_ptr ) /** - * @param value reference of the value to protect. + * @param val reference of the value to protect. * @param mtx reference to the mutex used to protect the value. * @effects locks the mutex @c mtx, stores a reference to it and to the value type @c value. */ @@ -204,7 +204,7 @@ namespace boost BOOST_THREAD_MOVABLE_ONLY(const_unique_lock_ptr) /** - * @param value reference of the value to protect. + * @param val reference of the value to protect. * @param mtx reference to the mutex used to protect the value. * * @requires If mutex_type is not a recursive mutex the calling thread does not own the mutex. @@ -216,9 +216,9 @@ namespace boost { } /** - * @param value reference of the value to protect. + * @param val reference of the value to protect. * @param mtx reference to the mutex used to protect the value. - * @param tag of type adopt_lock_t used to differentiate the constructor. + * @note the unnamed third argument of type adopt_lock_t selects this constructor. * @requires The calling thread own the mutex. * @effects stores a reference to it and to the value type @c value taking ownership. */ @@ -227,9 +227,9 @@ namespace boost { } /** - * @param value reference of the value to protect. + * @param val reference of the value to protect. * @param mtx reference to the mutex used to protect the value. - * @param tag of type defer_lock_t used to differentiate the constructor. + * @note the unnamed third argument of type defer_lock_t selects this constructor. * @effects stores a reference to it and to the value type @c value c. */ const_unique_lock_ptr(T const& val, Lockable & mtx, defer_lock_t) BOOST_NOEXCEPT @@ -237,9 +237,9 @@ namespace boost { } /** - * @param value reference of the value to protect. + * @param val reference of the value to protect. * @param mtx reference to the mutex used to protect the value. - * @param tag of type try_to_lock_t used to differentiate the constructor. + * @note the unnamed third argument of type try_to_lock_t selects this constructor. * @requires If mutex_type is not a recursive mutex the calling thread does not own the mutex. * @effects try to lock the mutex @c mtx, stores a reference to it and to the value type @c value. */ @@ -300,7 +300,7 @@ namespace boost BOOST_THREAD_MOVABLE_ONLY(unique_lock_ptr) /** - * @param value reference of the value to protect. + * @param val reference of the value to protect. * @param mtx reference to the mutex used to protect the value. * @effects locks the mutex @c mtx, stores a reference to it and to the value type @c value. */ @@ -311,7 +311,7 @@ namespace boost /** * @param value reference of the value to protect. * @param mtx reference to the mutex used to protect the value. - * @param tag of type adopt_lock_t used to differentiate the constructor. + * @note the unnamed third argument of type adopt_lock_t selects this constructor. * @effects stores a reference to it and to the value type @c value taking ownership. */ unique_lock_ptr(T & value, Lockable & mtx, adopt_lock_t) BOOST_NOEXCEPT @@ -321,7 +321,7 @@ namespace boost /** * @param value reference of the value to protect. * @param mtx reference to the mutex used to protect the value. - * @param tag of type defer_lock_t used to differentiate the constructor. + * @note the unnamed third argument of type defer_lock_t selects this constructor. * @effects stores a reference to it and to the value type @c value c. */ unique_lock_ptr(T & value, Lockable & mtx, defer_lock_t) BOOST_NOEXCEPT @@ -331,7 +331,7 @@ namespace boost /** * @param value reference of the value to protect. * @param mtx reference to the mutex used to protect the value. - * @param tag of type try_to_lock_t used to differentiate the constructor. + * @note the unnamed third argument of type try_to_lock_t selects this constructor. * @effects try to lock the mutex @c mtx, stores a reference to it and to the value type @c value. */ unique_lock_ptr(T & value, Lockable & mtx, try_to_lock_t) BOOST_NOEXCEPT