File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -164,3 +164,23 @@ Constructs a decimal value that matches `str` subject to:
164164. On overflow constructs `INF`
165165. On underflow constructs `0`
166166. Rounds value represented by `str` according to current rounding mode
167+
168+ === Conversion to integral type
169+
170+ [source,c++]
171+ ----
172+ // 3.2.2.4 Conversion to integral type
173+
174+ explicit constexpr operator int() const noexcept;
175+ explicit constexpr operator unsigned() const noexcept;
176+ explicit constexpr operator long() const noexcept;
177+ explicit constexpr operator unsigned long() const noexcept;
178+ explicit constexpr operator long long() const noexcept;
179+ explicit constexpr operator unsigned long long() const noexcept;
180+ ----
181+
182+ Constructs an integer representation of the decimal value subject to:
183+
184+ . If the decimal value is `INF` returns `std::numeric_limits<IntegerType>::max()`
185+ . If the decimal value is `NAN` returns `std::numeric_limits<IntegerType>::max()`
186+ . If the decimal value exceeds the range of the `IntegerType` returns `std::numeric_limits<IntegerType>::max()`
You can’t perform that action at this time.
0 commit comments