Skip to content

Commit fe3bbd6

Browse files
authored
Merge pull request #1271 from cppalliance/non-member
2 parents 2bc8e5f + 85edee6 commit fe3bbd6

File tree

7 files changed

+368
-4
lines changed

7 files changed

+368
-4
lines changed

doc/modules/ROOT/pages/decimal128_t.adoc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ explicit constexpr operator std::float64_t() const noexcept;
106106
explicit constexpr operator std::bfloat16_t() const noexcept;
107107
108108
explicit constexpr operator decimal32_t() const noexcept;
109+
explicit constexpr operator decimal_fast32_t() const noexcept;
109110
explicit constexpr operator decimal64_t() const noexcept;
111+
explicit constexpr operator decimal_fast64_t() const noexcept;
112+
explicit constexpr operator decimal_fast128_t() const noexcept;
110113
111114
}; // class decimal128_t
112115
@@ -230,11 +233,20 @@ Matches the behavior of xref:generic_decimal.adoc#operator_behavior[addition, su
230233
[source,c++]
231234
----
232235
explicit constexpr operator decimal32_t() const noexcept;
236+
explicit constexpr operator decimal_fast32_t() const noexcept;
233237
explicit constexpr operator decimal64_t() const noexcept;
238+
explicit constexpr operator decimal_fast64_t() const noexcept;
239+
explicit constexpr operator decimal_fast128_t() const noexcept;
234240
----
235241

236-
Conversion to `decimal32_t` or `decimal64_t` is subject to:
242+
Conversion to `decimal_fast128_t` is lossless in all cases.
243+
244+
Conversion to all other decimal types is subject to:
237245

238246
. Current rounding mode if the number of digits exceeds the precision of the target type.
239247
. Overflow constructs `INF`.
240248
. Underflow constructs `0`.
249+
250+
== Non-Member Operator Behavior
251+
252+
See xref:generic_decimal.adoc#operator_behavior[here] for behavior of non-member operators.

doc/modules/ROOT/pages/decimal32_t.adoc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,11 @@ explicit constexpr operator std::float32_t() const noexcept;
105105
explicit constexpr operator std::float64_t() const noexcept;
106106
explicit constexpr operator std::bfloat16_t() const noexcept;
107107
108+
explicit constexpr operator decimal_fast32_t() const noexcept;
108109
explicit constexpr operator decimal64_t() const noexcept;
110+
explicit constexpr operator decimal_fast64_t() const noexcept;
109111
explicit constexpr operator decimal128_t() const noexcept;
112+
explicit constexpr operator decimal_fast128_t() const noexcept;
110113
111114
}; // class decimal32_t
112115
@@ -229,8 +232,15 @@ Matches the behavior of xref:generic_decimal.adoc#operator_behavior[addition, su
229232

230233
[source,c++]
231234
----
235+
explicit constexpr operator decimal_fast32_t() const noexcept;
232236
explicit constexpr operator decimal64_t() const noexcept;
237+
explicit constexpr operator decimal_fast64_t() const noexcept;
233238
explicit constexpr operator decimal128_t() const noexcept;
239+
explicit constexpr operator decimal_fast128_t() const noexcept;
234240
----
235241

236-
Losslessly converts the current decimal value to `decimal64_t` or `decimal128_t`.
242+
Losslessly converts the current decimal value to all other decimal types.
243+
244+
== Non-Member Operator Behavior
245+
246+
See xref:generic_decimal.adoc#operator_behavior[here] for behavior of non-member operators.

doc/modules/ROOT/pages/decimal64_t.adoc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ explicit constexpr operator std::float64_t() const noexcept;
106106
explicit constexpr operator std::bfloat16_t() const noexcept;
107107
108108
explicit constexpr operator decimal32_t() const noexcept;
109+
explicit constexpr operator decimal_fast32_t() const noexcept;
110+
explicit constexpr operator decimal_fast64_t() const noexcept;
109111
explicit constexpr operator decimal128_t() const noexcept;
112+
explicit constexpr operator decimal_fast128_t() const noexcept;
110113
111114
}; // class decimal64_t
112115
@@ -230,14 +233,20 @@ Matches the behavior of xref:generic_decimal.adoc#operator_behavior[addition, su
230233
[source,c++]
231234
----
232235
explicit constexpr operator decimal32_t() const noexcept;
236+
explicit constexpr operator decimal_fast32_t() const noexcept;
237+
explicit constexpr operator decimal_fast64_t() const noexcept;
233238
explicit constexpr operator decimal128_t() const noexcept;
239+
explicit constexpr operator decimal_fast128_t() const noexcept;
234240
----
235241

236-
Conversion to `decimal32_t` is subject to:
242+
Conversion to `decimal32_t or `decimal_fast32_t` is subject to:
237243

238244
. Current rounding mode if the number of digits exceeds the precision of `decimal32_t`
239245
. Overflow constructs `INF`
240246
. Underflow constructs `0`
241247

242-
Conversion to `decimal128_t` is lossless in all cases.
248+
Conversion to all other decimal types is lossless in all cases.
243249

250+
== Non-Member Operator Behavior
251+
252+
See xref:generic_decimal.adoc#operator_behavior[here] for behavior of non-member operators.

doc/modules/ROOT/pages/decimal_fast128_t.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,3 +249,7 @@ Conversion to any other decimal type is subject to:
249249
. Current rounding mode if the number of digits exceeds the precision of the target type.
250250
. Overflow constructs `INF`.
251251
. Underflow constructs `0`.
252+
253+
== Non-Member Operator Behavior
254+
255+
See xref:fast_types.adoc#fast_operator_behavior[here] for behavior of non-member operators.

doc/modules/ROOT/pages/decimal_fast32_t.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,6 @@ explicit constexpr operator decimal_fast128_t() const noexcept;
243243

244244
Losslessly converts the current decimal value to other decimal type.
245245

246+
== Non-Member Operator Behavior
247+
248+
See xref:fast_types.adoc#fast_operator_behavior[here] for behavior of non-member operators.

doc/modules/ROOT/pages/decimal_fast64_t.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,3 +249,6 @@ Conversion to `decimal32_t` or `decimal_fast32_t` is subject to:
249249

250250
Conversion to `decimal128_t` or `decimal_fast128_t` is lossless in all cases.
251251

252+
== Non-Member Operator Behavior
253+
254+
See xref:fast_types.adoc#fast_operator_behavior[here] for behavior of non-member operators.

0 commit comments

Comments
 (0)