Skip to content

Commit 9848949

Browse files
committed
Add static assert
1 parent 9e06219 commit 9848949

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/boost/decimal/gcc_decimal32.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ BOOST_DECIMAL_EXPORT class gcc_decimal32 final
3434

3535
private:
3636

37+
static_assert(sizeof(std::decimal::decimal32) == sizeof(std::uint32_t), "Incorrect size detected. std::decimal::decimal32 must be exactly 32 bits");
38+
3739
std::decimal::decimal32 internal_decimal_ {};
3840

3941
// Returns the un-biased (quantum) exponent

0 commit comments

Comments
 (0)