From 37cf77f05e50af4b990c714434d0f52d5471a31b Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 6 Jul 2026 14:50:55 -0400 Subject: [PATCH 1/2] Update wording --- doc/modules/ROOT/pages/bit.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/modules/ROOT/pages/bit.adoc b/doc/modules/ROOT/pages/bit.adoc index a25f94e9..355b6978 100644 --- a/doc/modules/ROOT/pages/bit.adoc +++ b/doc/modules/ROOT/pages/bit.adoc @@ -5,7 +5,7 @@ https://www.boost.org/LICENSE_1_0.txt //// [#Bit] -= `` += `` Support :idprefix: bit_ [source,c++] From a170b84781f8ae7ba6a893dbabd0c484f51fb154 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 6 Jul 2026 15:22:31 -0400 Subject: [PATCH 2/2] Exclude pre-processor items from inline examples --- doc/modules/ROOT/pages/examples.adoc | 6 +++--- examples/bit.cpp | 4 ++++ examples/fmt_format.cpp | 6 ++++++ examples/math_and_random.cpp | 2 ++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/doc/modules/ROOT/pages/examples.adoc b/doc/modules/ROOT/pages/examples.adoc index 18620bbc..9f2b4fdb 100644 --- a/doc/modules/ROOT/pages/examples.adoc +++ b/doc/modules/ROOT/pages/examples.adoc @@ -196,7 +196,7 @@ Min - 1: 170141183460469231731687303715884105727 ==== [source, c++] ---- -include::example$bit.cpp[] +include::example$bit.cpp[tags=**;!exclude] ---- ==== @@ -348,7 +348,7 @@ signed_value / 4U = 0 ==== [source, c++] ---- -include::example$math_and_random.cpp[] +include::example$math_and_random.cpp[tags=**;!exclude] ---- .Example Output (values vary per run) @@ -439,7 +439,7 @@ int128_t max: 170141183460469231731687303715884105727 ==== [source, c++] ---- -include::example$fmt_format.cpp[] +include::example$fmt_format.cpp[tags=**;!exclude] ---- .Expected Output diff --git a/examples/bit.cpp b/examples/bit.cpp index 4c0291c0..b025ca23 100644 --- a/examples/bit.cpp +++ b/examples/bit.cpp @@ -11,6 +11,7 @@ // #include +// tag::exclude[] #ifdef __clang__ # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wunused-variable" @@ -32,6 +33,7 @@ int main() #else +// end::exclude[] int main() { // The functions from bit are only available for uint128_t @@ -80,5 +82,7 @@ int main() return 0; } +// tag::exclude[] #endif +// end::exclude[] diff --git a/examples/fmt_format.cpp b/examples/fmt_format.cpp index 880aa227..d953f803 100644 --- a/examples/fmt_format.cpp +++ b/examples/fmt_format.cpp @@ -8,12 +8,16 @@ // For C++20 std::format support, use instead, // which provides the same formatting capabilities with std::format. +// tag::exclude[] #define FMT_HEADER_ONLY +// end::exclude[] #include #include +// tag::exclude[] #ifdef BOOST_INT128_HAS_FMT_FORMAT +// end::exclude[] #include #include @@ -112,6 +116,7 @@ int main() return 0; } +// tag::exclude[] #else @@ -125,3 +130,4 @@ int main() } #endif +// end::exclude[] diff --git a/examples/math_and_random.cpp b/examples/math_and_random.cpp index 7d63d430..7fd2b069 100644 --- a/examples/math_and_random.cpp +++ b/examples/math_and_random.cpp @@ -5,6 +5,7 @@ #include #include // Not included in the convenience header, but needed for boost.random interop +// tag::exclude[] #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wfloat-equal" @@ -16,6 +17,7 @@ #pragma GCC diagnostic ignored "-Wfloat-equal" #endif +// end::exclude[] #include #include #include