Skip to content

doc: qualify the @ref targets that named initialize - #106

Merged
jll63 merged 1 commit into
boostorg:developfrom
jll63:fix/doc-ref-initialize
Sep 13, 2026
Merged

doc: qualify the @ref targets that named initialize#106
jll63 merged 1 commit into
boostorg:developfrom
jll63:fix/doc-ref-initialize

Conversation

@jll63

@jll63 jll63 commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

(Written by Claude Code, on behalf of @jll63.)

Six @ref targets naming initialize() resolved to something else, or to nothing. MrDocs
reports neither case: an unresolved @ref is emitted as plain text, which looks exactly like
a deliberate code span, and one that resolves to a real-but-wrong symbol renders as a
confident link to the wrong page. Nothing in the build catches either, so both survive
indefinitely.

@ref registry::initialize — four dead links

MrDocs puts the member under registry-07/ and emits no initialize.adoc there, so the
target does not exist and all four rendered as an unlinked registry::initialize code span:

source rendered page
initialize.hpp (on finalize) boost/openmethod/finalize.adoc
preamble.hpp (on VptrFn::initialize) policies/VptrFn/initialize.adoc
preamble.hpp (on output) policies/output.adoc
preamble.hpp (on static_vptr) registry-07/static_vptr.adoc

@ref initialize — two self-links

On VptrFn::initialize and TypeHashFn::initialize it resolved to the sibling member being
documented, so each rendered as href="#" — a link to the page you are already on — where
the sentence promises the exception-safety section of the free function:

see <a href="#"><code>initialize</code></a>

The fix

All six become @ref boost::openmethod::initialize, the form already used in
default_registry.hpp and macros.hpp. Resolution is scope-relative, which is why the same
spelling works unqualified at namespace scope and fails inside a class that has its own
initialize.

Deliberately left alone

Two @ref initialize targets self-scope correctly and are not touched:
TypeHashFn::hash_range ("Only valid after a call to...") and fast_perfect_hash's hash
("the set passed to..."). Both sentences are about the policy's own function, not the free
one.

Verification

Rendered with doc/build_antora.sh and checked against the HTML, rather than read off the
source:

  • both former self-links now emit
    <a href="../../initialize.html" class="xref page"><code>boost::openmethod::initialize</code></a>;
  • no href="#"><code>initialize anywhere in doc/html/;
  • no registry::initialize code span anywhere in doc/html/;
  • all four former dead-link pages now carry a resolved xref, and the target page exists;
  • grep -rl MRDOCS doc/html/ is empty.

Two notes on things this PR does not change, both pre-existing:

  • asciidoctor warns "section title out of sequence" five times, in
    interop_type_erasure.adoc (4) and multiple_dispatch.adoc (1).
  • the check CLAUDE.md prescribes, grep -rn "\'" doc/modules/ROOT/pages/*.adoc, has two false positives in interop_type_erasure.adoc: the ``` ``any``'s ``` double-backtick spelling renders correctly as any's`, and the following code span keeps its
    formatting. The guard only anticipates the single-backtick form.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JQa4fuiwcfsheZYTCyfPPr

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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQa4fuiwcfsheZYTCyfPPr
@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://106.openmethod.prtest3.cppalliance.org/libs/openmethod/doc/html/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-09-12 14:32:01 UTC

@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.52%. Comparing base (5ec487c) to head (ee1a76a).
⚠️ Report is 10 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #106      +/-   ##
===========================================
+ Coverage    93.46%   93.52%   +0.05%     
===========================================
  Files           22       22              
  Lines         1653     1683      +30     
  Branches       500      508       +8     
===========================================
+ Hits          1545     1574      +29     
  Misses          64       64              
- Partials        44       45       +1     
Files with missing lines Coverage Δ
include/boost/openmethod/initialize.hpp 92.75% <ø> (+0.09%) ⬆️
include/boost/openmethod/preamble.hpp 82.14% <ø> (+5.35%) ⬆️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba56242...ee1a76a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jll63
jll63 merged commit 944693d into boostorg:develop Sep 13, 2026
56 checks passed
@jll63
jll63 deleted the fix/doc-ref-initialize branch September 13, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants