You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(examples): make snippets compile — containers, strings, text-processing #27
Part of #20. Drive tools/snippet_baseline/gcc.txt to empty for these folders: fix each failing block (make it self-contained, add a prelude name only if it's truly generic, or use body), or tag it nocompile / compile-fail="…" / needs=… when that's the honest answer. Delete fixed lines from the baseline. Don't change what a page teaches; if a snippet is wrong, fix it and say so in the PR.
Acceptance: no baseline entries left for these folders; python3 tools/check_snippets.py <folders> --cxx g++-15 -q --baseline tools/snippet_baseline/gcc.txt exits 0.
All 82 failing blocks in docs/examples/{containers,strings,text-processing} now compile (wrapped in main() or made body blocks with their declarations); their 82 lines are deleted from the baseline. No prelude changes.
Wrong snippets fixed: forward_list.mdmerge() had no argument and ran after reverse() (input unsorted); list.mdmerge() had no argument; localization.md promised 1,234,567.89 but printed 1.23457e+06 — now uses std::fixed and setprecision(2).
Why
This issue's part of docs: complete the reference — fill gaps against cppreference and fix the root README #20. Verified locally: 108 checked, 0 failed, 12 skipped on GCC 15; full baseline run exits 0; Clang 22/libc++ with --enable mdspan: 0 failures. Every runnable edited block was built and run with GCC 15 and its output checked against the comments; locale output checked with glibc and libc++ for en_US and de_DE.
Still open
needs=hive (5) and needs=inplace_vector (2) are uncompiled — no local compiler ships those headers. The mdspan blocks run on GCC 16.2 and Clang 22; only GCC 15 lacks the header.
Activity
homer6 commentedon Oct 31, 2026
Delivered in #35.
What changed
docs/examples/{containers,strings,text-processing}now compile (wrapped inmain()or madebodyblocks with their declarations); their 82 lines are deleted from the baseline. No prelude changes.forward_list.mdmerge()had no argument and ran afterreverse()(input unsorted);list.mdmerge()had no argument;localization.mdpromised1,234,567.89but printed1.23457e+06— now usesstd::fixedandsetprecision(2).Why
--enable mdspan: 0 failures. Every runnable edited block was built and run with GCC 15 and its output checked against the comments; locale output checked with glibc and libc++ for en_US and de_DE.Still open
needs=hive(5) andneeds=inplace_vector(2) are uncompiled — no local compiler ships those headers. The mdspan blocks run on GCC 16.2 and Clang 22; only GCC 15 lacks the header.homer6 commentedon Oct 31, 2026
Merged in #35 (0a952c0).
What changed
mainbefore merging: No conflicts.Why
Still open