Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add cppref NamedRequirements support #6020

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmake/templates/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,14 @@ breathe_doxygen_config_options = {
'MACRO_EXPANSION': 'YES',
'DIRECTORY_GRAPH': 'NO',
'PREDEFINED': '@doxygen_definitions@',
'STRIP_FROM_PATH': hpx_source_dir
'STRIP_FROM_PATH': hpx_source_dir,
'ALIASES': r'namedrequirement{1}="<a href=\"https://en.cppreference.com/w/cpp/named_req/\1\">\1</a>"'
}

# ! this should work but doesn't. check after updating breathe version.
# breathe_doxygen_aliases = {
# }

numfig = True
primary_domain = 'cpp'
highlight_language = 'cpp'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,19 @@ namespace hpx {
/// \a hpx::condition_variable works only with \a std::unique_lock<hpx::mutex>.
/// This restriction allows for maximal efficiency on some platforms.
/// \a hpx::condition_variable_any provides a condition variable that works
/// with any \a BasicLockable object, such as \a std::shared_lock.
/// with any \namedrequirement{BasicLockable} object, such as
/// \a std::shared_lock.
///
/// Condition variables permit concurrent invocation of the \a wait,
/// \a wait_for, \a wait_until, \a notify_one and \a notify_all member
/// functions.
///
/// The class \a hpx::condition_variable is a \a StandardLayoutType.
/// It is not \a CopyConstructible, \a MoveConstructible, \a CopyAssignable,
/// or \a MoveAssignable.
///
/// The class \a hpx::condition_variable is a
/// \namedrequirement{StandardLayoutType}.
/// It is not \namedrequirement{CopyConstructible},
/// \namedrequirement{MoveConstructible},
/// \namedrequirement{CopyAssignable}, or
/// \namedrequirement{MoveAssignable}.
///
class condition_variable
{
Expand Down Expand Up @@ -507,13 +510,15 @@ namespace hpx {
/// \brief The \a condition_variable_any class is a generalization of
/// \a hpx::condition_variable. Whereas \a hpx::condition_variable works
/// only on \a std::unique_lock<std::mutex>, \a acondition_variable_any can
/// operate on any lock that meets the \a BasicLockable requirements.
/// operate on any lock that meets the \namedrequirement{BasicLockable}
/// requirements.
///
/// See \a hpx::condition_variable for the description of the semantics of
/// condition variables.
/// The class \a hpx::condition_variable_any is a \a StandardLayoutType. It
/// is not \a CopyConstructible, \a MoveConstructible, \a CopyAssignable,
/// or \a MoveAssignable.
/// It is not \namedrequirement{CopyConstructible},
/// \namedrequirement{MoveConstructible},
/// \namedrequirement{CopyAssignable}, or
/// \namedrequirement{MoveAssignable}.
///
class condition_variable_any
{
Expand Down Expand Up @@ -675,8 +680,9 @@ namespace hpx {
///
/// \tparam Lock Type of \a lock.
///
/// \param lock An object of type Lock that meets the \a BasicLockable
/// requirements, which must be locked by the current thread
/// \param lock An object of type Lock that meets the
/// \namedrequirement{BasicLockable} requirements, which
/// must be locked by the current thread
/// \param ec Used to hold error code value originated during the
/// operation. Defaults to \a throws -- A special'throw on
/// error' \a error_code.
Expand Down Expand Up @@ -740,8 +746,9 @@ namespace hpx {
/// \tparam Lock Type of \a lock.
/// \tparam Predicate Type of \a pred.
///
/// \param lock an object of type Lock that meets the \a BasicLockable
/// requirements, which must be locked by the current thread
/// \param lock an object of type Lock that meets the
/// \namedrequirement{BasicLockable} requirements, which
/// must be locked by the current thread
/// \param pred predicate which returns `false` if the waiting should
/// be continued `(bool(pred()) == false)`.
/// The signature of the predicate function should be
Expand Down Expand Up @@ -785,7 +792,8 @@ namespace hpx {
/// \tparam Lock Type of \a lock.
///
/// \param lock an object of type \a Lock that meets the
/// requirements of \a BasicLockable, which must be
/// requirements of
/// \namedrequirement{BasicLockable}, which must be
/// locked by the current thread
/// \param abs_time represents the time when waiting should be stopped.
/// \param ec used to hold error code value originated during the
Expand Down Expand Up @@ -860,8 +868,8 @@ namespace hpx {
/// \tparam Predicate Type of \a pred.
///
/// \param lock an object of type \a Lock that meets the
/// requirements of \a BasicLockable, which must be
/// locked by the current thread
/// requirements of \namedrequirement{BasicLockable},
/// which must be locked by the current thread
/// \param abs_time represents the time when waiting should be stopped.
/// \param pred predicate which returns \a false if the waiting
/// should be continued
Expand Down Expand Up @@ -916,8 +924,8 @@ namespace hpx {
/// \tparam Lock Type of \a lock.
///
/// \param lock an object of type \a Lock that meets the
/// \a BasicLockable requirements, which must be locked
/// by the current thread.
/// \namedrequirement{BasicLockable} requirements,
/// which must be locked by the current thread.
/// \param rel_time an object of type \a hpx::chrono::duration
/// representing the maximum time to spend waiting. Note
/// that \a rel_time must be small enough not to
Expand Down Expand Up @@ -962,7 +970,8 @@ namespace hpx {
/// \tparam Predicate Type of \a pred.
///
/// \param lock an object of type \a Lock that meets the
/// \a BasicLockable requirements, which must be locked
/// \namedrequirement{BasicLockable} requirements,which
/// must be locked
/// by the current thread.
/// \param rel_time an object of type \a hpx::chrono::duration
/// representing the maximum time to spend waiting. Note
Expand Down Expand Up @@ -1021,9 +1030,9 @@ namespace hpx {
/// \tparam Lock Type of \a lock.
/// \tparam Predicate Type of \a pred.
///
/// \param lock an object of type Lock that meets the \a BasicLockable
/// requirements, which must be locked by the current
/// thread
/// \param lock an object of type Lock that meets the
/// \namedrequirement{BasicLockable} requirements, which
/// must be locked by the current thread
/// \param stoken a \a hpx::stop_token to register interruption for
/// \param pred predicate which returns `false` if the waiting should
/// be continued `(bool(pred()) == false)`.
Expand Down Expand Up @@ -1111,8 +1120,8 @@ namespace hpx {
/// \tparam Predicate Type of \a pred.
///
/// \param lock an object of type \a Lock that meets the
/// requirements of \a BasicLockable, which must be
/// locked by the current thread.
/// requirements of \namedrequirement{BasicLockable},
/// which must be locked by the current thread.
/// \param stoken a \a hpx::stop_token to register interruption for.
/// \param abs_time represents the time when waiting should be stopped.
/// \param pred predicate which returns \a false if the waiting
Expand Down Expand Up @@ -1207,8 +1216,8 @@ namespace hpx {
/// \tparam Predicate Type of \a pred.
///
/// \param lock an object of type \a Lock that meets the
/// \a BasicLockable requirements, which must be locked
/// by the current thread.
/// \namedrequirement{BasicLockable} requirements,
/// which must be locked by the current thread.
/// \param stoken a \a hpx::stop_token to register interruption for.
/// \param rel_time an object of type \a hpx::chrono::duration
/// representing the maximum time to spend waiting. Note
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace hpx {
/// The behavior of a program is undefined if a \a mutex is
/// destroyed while still owned by any threads, or a thread
/// terminates while owning a \a mutex. The mutex class satisfies
/// all requirements of \a Mutex and \a StandardLayoutType.
/// all requirements of \namedrequirement{Mutex} and \namedrequirement{StandardLayoutType}.
///
/// \a hpx::mutex is neither copyable nor movable.
///
Expand Down Expand Up @@ -242,7 +242,8 @@ namespace hpx {
/// \a timed_mutex with a timeout via the member functions
/// \a try_lock_for() and \a try_lock_until().
/// The \a timed_mutex class satisfies all requirements of
/// \a TimedMutex and \a StandardLayoutType.
/// \namedrequirement{TimedMutex} and
/// \namedrequirement{StandardLayoutType}.
///
/// \a hpx::timed_mutex is neither copyable nor movable.
///
Expand Down