Skip to content

Commit 020b87d

Browse files
committed
Make it more clear how to use user configurable macros
1 parent e23fdb5 commit 020b87d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/modules/ROOT/pages/config.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,24 @@ This option is not recommended, but can be useful if you want to use specific fu
2323

2424
[source, c++]
2525
----
26+
#define BOOST_DECIMAL_ALLOW_IMPLICIT_CONVERSIONS
27+
#include <boost/decimal.hpp>
28+
#include <complex>
29+
2630
constexpr decimal64_t half {5, -1};
2731
std::complex<decimal64_t> test_val {half, half};
2832
const auto res = std::acos(test_val);
2933
----
3034

3135
- `BOOST_DECIMAL_FAST_MATH` performs optimizations similar to that of the `-ffast-math` compiler flag such as removing all checks for non-finite values.
3236
This flag increases the performance of the basis operations (e.g. add, sub, mul, div, and comparisons) by up to 20%.
37+
Again, it must be defined before inclusion of decimal headers like so:
38+
39+
[source, c++]
40+
----
41+
#define BOOST_DECIMAL_FAST_MATH
42+
#include <boost/decimal.hpp>
43+
----
3344

3445
- `BOOST_DECIMAL_DEC_EVAL_METHOD`: See <cfloat> section for explanation
3546

0 commit comments

Comments
 (0)