From ee1a76af7accfd991e9f71b1232d311f0ab98640 Mon Sep 17 00:00:00 2001 From: Jean-Louis Leroy Date: Sat, 12 Sep 2026 10:23:29 -0400 Subject: [PATCH] doc: qualify the @ref targets that named initialize Six @ref targets naming initialize() resolved to something else, or to nothing, and MrDocs reports neither: an unresolved @ref is emitted as plain text, which looks exactly like a deliberate code span, and one that resolves to the wrong symbol renders as a confident link to the wrong page. `@ref registry::initialize`, in four places, names no page at all - MrDocs puts the member under registry-07/ and emits no initialize.adoc there - so all four rendered as an unlinked `registry::initialize` code span. `@ref initialize` on VptrFn::initialize and TypeHashFn::initialize resolved to the sibling member being documented, so each rendered as a self-link, `href="#"`, where the text promises the exception-safety section of the free function. Spell all six `@ref boost::openmethod::initialize`, the form already used in default_registry.hpp and macros.hpp, which resolves. Left alone deliberately: `@ref initialize` in TypeHashFn::hash_range, which self-scopes to TypeHashFn::initialize, and in fast_perfect_hash's `hash`, which self-scopes to that policy's own initialize. Both are right as they are - the sentence is about the policy's function, not the free one. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01JQa4fuiwcfsheZYTCyfPPr --- include/boost/openmethod/initialize.hpp | 2 +- include/boost/openmethod/preamble.hpp | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/boost/openmethod/initialize.hpp b/include/boost/openmethod/initialize.hpp index 7f4c4e8c..9d273382 100644 --- a/include/boost/openmethod/initialize.hpp +++ b/include/boost/openmethod/initialize.hpp @@ -2301,7 +2301,7 @@ auto registry::finalize(Options... opts) -> void { //! Release resources held by registry. //! //! `finalize` may be called to release any resources allocated by -//! @ref registry::initialize. +//! @ref boost::openmethod::initialize. //! //! @note //! A translation unit that contains a call to `finalize` must include the diff --git a/include/boost/openmethod/preamble.hpp b/include/boost/openmethod/preamble.hpp index 0a576d3d..8d794902 100644 --- a/include/boost/openmethod/preamble.hpp +++ b/include/boost/openmethod/preamble.hpp @@ -714,12 +714,12 @@ template struct VptrFn { //! Register the v-table pointers. //! - //! Called by @ref registry::initialize to let the policy store the v-table - //! pointer associated to each `type_id`. + //! Called by @ref boost::openmethod::initialize to let the policy store + //! the v-table pointer associated to each `type_id`. //! //! If this function, or another policy's `initialize`, throws, the - //! policy's `state` is restored to its previous value; see @ref - //! initialize. + //! policy's `state` is restored to its previous value; see + //! @ref boost::openmethod::initialize. //! //! @tparam Context A class that conforms to the @ref InitializeContext //! blueprint. @@ -814,8 +814,8 @@ struct TypeHashFn { //! Initialize the hash table. //! //! If this function, or another policy's `initialize`, throws, the - //! policy's `state` is restored to its previous value; see @ref - //! initialize. + //! policy's `state` is restored to its previous value; see + //! @ref boost::openmethod::initialize. //! //! @tparam Context A class that conforms to the @ref InitializeContext //! blueprint. @@ -889,8 +889,8 @@ struct OutputFn { //! Policy for writing diagnostics and trace. //! //! If an `output` policy is present, the default error handler uses it to write -//! error messages to its output stream. @ref registry::initialize can also use -//! it to write trace messages. +//! error messages to its output stream. @ref boost::openmethod::initialize +//! can also use it to write trace messages. //! //! @par Requirements //! @@ -1307,9 +1307,9 @@ class registry : public detail::registry_base { //! A pointer to the virtual table for a registered class. //! - //! `static_vptr` is set by @ref registry::initialize to the address of the - //! class' virtual table. It remains valid until the next call to - //! `initialize` or `finalize`. + //! `static_vptr` is set by @ref boost::openmethod::initialize to the + //! address of the class' virtual table. It remains valid until the next + //! call to `initialize` or `finalize`. //! //! @tparam Class A registered class. template