Skip to content

Commit e2d2e2a

Browse files
committed
Document new implicit conversion macros
1 parent 66b697f commit e2d2e2a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

doc/modules/ROOT/pages/api_reference.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ enums, constants and macros that are provided in this library.
5151
| xref:config.adoc#configuration_user[`BOOST_DECIMAL_DISABLE_IOSTREAM`] | xref:config.adoc#configuration_automatic[`BOOST_DECIMAL_NO_CONSTEVAL_DETECTION`]
5252
| xref:config.adoc#configuration_user[`BOOST_DECIMAL_DISABLE_CLIB`] | xref:config.adoc#configuration_automatic[`BOOST_DECIMAL_HAS_STD_CHARCONV`]
5353
| xref:config.adoc#configuration_user[`BOOST_DECIMAL_DISABLE_EXCEPTIONS`] | xref:config.adoc#configuration_automatic[`BOOST_DECIMAL_HAS_STD_STRING_VIEW`]
54+
| xref:config.adoc#configuration_user[`BOOST_DECIMAL_ALLOW_IMPLICIT_INTEGER_CONVERSIONS`] |
55+
| xref:config.adoc#configuration_user[`BOOST_DECIMAL_ALLOW_IMPLICIT_FLOAT_CONVERSIONS`] |
5456
| xref:config.adoc#configuration_user[`BOOST_DECIMAL_ALLOW_IMPLICIT_CONVERSIONS`] |
5557
| xref:config.adoc#configuration_user[`BOOST_DECIMAL_FAST_MATH`] |
5658
| xref:config.adoc#configuration_user[`BOOST_DECIMAL_DEC_EVAL_METHOD`] |

doc/modules/ROOT/pages/config.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ The following configuration macros are available:
2222
- `BOOST_DECIMAL_DISABLE_EXCEPTIONS`: This allows the user to disable any calls to `throw`.
2323
This macro will also be set automatically in the presence of `-fno-exceptions` or various `/EH` flags on MSVC.
2424
25-
- `BOOST_DECIMAL_ALLOW_IMPLICIT_CONVERSIONS`: Allows a binary floating-point type (e.g. `double`) to be implicitly converted to a decimal floating point type.
25+
- `BOOST_DECIMAL_ALLOW_IMPLICIT_INTEGER_CONVERSIONS`: Allows any integer type to be implicitly converted to any decimal type.
26+
27+
- `BOOST_DECIMAL_ALLOW_IMPLICIT_FLOAT_CONVERSIONS`: Allows a binary floating-point type (e.g. `double`) to be implicitly converted to a decimal floating point type.
2628
This option is not recommended, but can be useful if you want to use specific functionality from the standard library with internal conversions such as:
2729
2830
[source, c++]
@@ -36,6 +38,8 @@ std::complex<decimal64_t> test_val {half, half};
3638
const auto res = std::acos(test_val);
3739
----
3840

41+
- `BOOST_DECIMAL_ALLOW_IMPLICIT_CONVERSIONS`: Defines both `BOOST_DECIMAL_ALLOW_IMPLICIT_INTEGER_CONVERSIONS` and `BOOST_DECIMAL_ALLOW_IMPLICIT_FLOAT_CONVERSIONS`
42+
3943
- `BOOST_DECIMAL_FAST_MATH` performs optimizations similar to that of the `-ffast-math` compiler flag such as removing all checks for non-finite values.
4044
This flag increases the performance of the basis operations (e.g. add, sub, mul, div, and comparisons) by up to 20%.
4145
Again, it must be defined before inclusion of decimal headers like so:

0 commit comments

Comments
 (0)