Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/bit.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ https://www.boost.org/LICENSE_1_0.txt
////

[#Bit]
= `<bit>`
= `<bit>` Support
:idprefix: bit_

[source,c++]
Expand Down
6 changes: 3 additions & 3 deletions doc/modules/ROOT/pages/examples.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Min - 1: 170141183460469231731687303715884105727
====
[source, c++]
----
include::example$bit.cpp[]
include::example$bit.cpp[tags=**;!exclude]
----
====

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -439,7 +439,7 @@ int128_t max: 170141183460469231731687303715884105727
====
[source, c++]
----
include::example$fmt_format.cpp[]
include::example$fmt_format.cpp[tags=**;!exclude]
----

.Expected Output
Expand Down
4 changes: 4 additions & 0 deletions examples/bit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

// #include <boost/int128.hpp>

// tag::exclude[]
#ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunused-variable"
Expand All @@ -32,6 +33,7 @@ int main()

#else

// end::exclude[]
int main()
{
// The functions from bit are only available for uint128_t
Expand Down Expand Up @@ -80,5 +82,7 @@ int main()

return 0;
}
// tag::exclude[]

#endif
// end::exclude[]
6 changes: 6 additions & 0 deletions examples/fmt_format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@
// For C++20 std::format support, use <boost/int128/format.hpp> instead,
// which provides the same formatting capabilities with std::format.

// tag::exclude[]
#define FMT_HEADER_ONLY
// end::exclude[]
#include <boost/int128/int128.hpp>
#include <boost/int128/fmt_format.hpp>

// tag::exclude[]
#ifdef BOOST_INT128_HAS_FMT_FORMAT

// end::exclude[]
#include <fmt/format.h>
#include <iostream>

Expand Down Expand Up @@ -112,6 +116,7 @@ int main()

return 0;
}
// tag::exclude[]

#else

Expand All @@ -125,3 +130,4 @@ int main()
}

#endif
// end::exclude[]
2 changes: 2 additions & 0 deletions examples/math_and_random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <boost/int128.hpp>
#include <boost/int128/random.hpp> // 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"
Expand All @@ -16,6 +17,7 @@
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif

// end::exclude[]
#include <boost/math/statistics/univariate_statistics.hpp>
#include <boost/random/uniform_int_distribution.hpp>
#include <iostream>
Expand Down
Loading