Repository navigation
Conversation
|
An automated preview of the documentation is available at https://142.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-11-12 13:57:41 UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #142 +/- ##
========================================
Coverage 92.56% 92.57%
========================================
Files 29 29
Lines 2314 2316 +2
Branches 699 699
========================================
+ Hits 2142 2144 +2
Misses 111 111
Partials 61 61 Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
jll63
force-pushed
the
doc/troubleshooting-examples
branch
from
November 8, 2026 15:49
d00569c to
72434b2
Compare
The page mixed a few worked compilation errors, the runtime errors, and an index of every message. It now has a short intro, then a compile-time section and a runtime section, grouped by category, with each error under a heading that quotes its message and a short example that produces it. The compile-time examples are compile_fail_*.cpp files under examples/troubleshooting/, which test/CMakeLists.txt already globs, so each one is checked against the message it is filed under. They share preamble.hpp, which the page shows once. Examples that only fail on some configurations (C++26 reflection, a translation unit without BMI2) emit the expected text with #error elsewhere, as test/compile_fail_reflection_*.cpp do. The runtime examples are new snippets: not implemented, ambiguous, not initialized, final_virtual_ptr misuse, conflicting definitions (two translation units that disagree on BOOST_OPENMETHOD_ENABLE_RUNTIME_CHECKS), and the minimal_perfect_hash and minimal_cover_hash search failures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01958YRGfNfb6SfQS9v4hWTr
MSVC does not instantiate a method from its declaration alone, so three compile-fail examples compiled cleanly there. Call the method after the tagged region, as the tests in test/ do. MSVC also names a class `struct Animal` in error messages, so the final and ODR snippets strip the key before comparing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01958YRGfNfb6SfQS9v4hWTr
Every entry now ends with a *Fix* listing that corrects its example. For a compile-time error the fix is troubleshooting/fix_<stem>.cpp, compiled as a test by test/CMakeLists.txt and test/Jamfile, so a fix that does not compile fails the build. For a runtime error it is snippets/fix_<stem>.cpp, a Boost.Test program that checks the call now succeeds silently. The page moves after the reference in the navigation. CLAUDE.md asks that every diagnostic keep an entry on the page, in the same change that adds, removes or rewords it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01958YRGfNfb6SfQS9v4hWTr
Every *Example* label now links to the example on Compiler Explorer, in an execution pane that shows the compiler output and, for an error reported at run time, the program output - no assembly. dev/ce_troubleshooting.py generates the links and rewrites them in place; run it whenever an example changes. A compile-time example becomes the preamble followed by the example file, without the guards that stand in for a missing feature. A run-time example, a Boost.Test program, becomes a main() that runs its tagged region without the harness, so the default error handler prints the message. The library comes from the flattened headers of develop. --check compiles and runs every example through the Compiler Explorer API and matches the output against the expected message. The ODR example needs two translation units and has no link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01958YRGfNfb6SfQS9v4hWTr
An error that can be fixed on either side - the overrider or the method, the parameter or the registry - now shows both, the second under an *Alternative fix* label with a sentence saying when to prefer it. Twenty entries have one, among them the pointer kinds, where the method may take a shared_virtual_ptr instead, and not implemented, where an overrider for Cat serves instead of one for Animal. Where the explanation already named the alternative, the clause moves to the sentence that introduces it. The alternatives are fix_<stem>_2.cpp, compiled as tests like the other fixes; snippets/fix_not_implemented_2.cpp checks that an Animal that is neither a Dog nor a Cat still has no overrider. CLAUDE.md asks for the second fix where an error admits one, and for the Compiler Explorer links to be regenerated when an example changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01958YRGfNfb6SfQS9v4hWTr
…xplorer A diagnostic is made of long lines, which a pane beside the source cuts short. The links now carry a layout rather than a session: the editor above the execution pane, which takes the whole width of the window. A session cannot say how its panes are arranged, and Compiler Explorer puts them side by side. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01958YRGfNfb6SfQS9v4hWTr
jll63
force-pushed
the
doc/troubleshooting-examples
branch
from
November 12, 2026 13:45
72434b2 to
e319d6c
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(Written by Claude Code, on behalf of @jll63.)
The troubleshooting page mixed three worked compilation errors, the runtime errors, and an index of every message. It now has a short intro, then a compile-time section, then a runtime section. Each is grouped by category, and every error sits under a heading that quotes its message, with a short example that produces it, the fix, and a link that opens the example on Compiler Explorer.
Compile-time
compile_fail_*.cppfile underdoc/modules/ROOT/examples/troubleshooting/.test/CMakeLists.txtandtest/Jamfilealready glob them, so in CMake each one is checked against the message it is filed under.preamble.hpp(includes,Node,Plus,my_registry), which the page shows once. The two existing examples now use it too.#errorwhere they can't fail, astest/compile_fail_reflection_*.cppalready do:-freflection, where they hit the real assertions;minimal_cover_hashin a translation unit without BMI2.size_t/void*check, which depends on the platform;named_static_rtticheck for__PRETTY_FUNCTION__/__FUNCSIG__, which depends on the compiler.structthat MSVC writes before class names.Runtime
New snippets, each checking the message on
stderr:final_virtual_ptrmisuseBOOST_OPENMETHOD_ENABLE_RUNTIME_CHECKSminimal_perfect_hashandminimal_cover_hashsearch failuresFixes
troubleshooting/fix_<stem>.cpp, compiled as a test bytest/CMakeLists.txtandtest/Jamfile, so a fix that does not compile fails the build. A runtime fix issnippets/fix_<stem>.cpp, a Boost.Test program that checks the call now succeeds silently.fix_<stem>_2.cpp. For example, fordifferent virtual_ptr<> pointer kinds, the method may take ashared_virtual_ptrinstead.Compiler Explorer links
dev/ce_troubleshooting.pygenerates the links and rewrites them in place; run it whenever an example changes. A compile-time example becomes the preamble followed by the example file. A runtime snippet becomes amain()without the test harness, so the default error handler prints the message. The library comes from the flattened headers ofdeveloppublished onboostorg.github.io, so the messages are those ofdevelop, not of the Boost release that Compiler Explorer offers.dev/ce_troubleshooting.py --checkcompiles and runs every example through the Compiler Explorer API, and matches the output against the expected message.Verification
ctest: 276/276 pass (clang 22).implicit_shared_libraries/named_static_rtti, is unrelated: this branch touches no header and no test there.dev/ce_troubleshooting.py --check: all 60 linked examples produce their expected message on Compiler Explorer (clang 23.1, gcc 16.1 for reflection).🤖 Generated with Claude Code
https://claude.ai/code/session_01958YRGfNfb6SfQS9v4hWTr