20#include <bsoncxx/stdx/string_view.hpp>
22#include <bsoncxx/config/prelude.hpp>
25BSONCXX_INLINE_NAMESPACE_BEGIN
45 decimal128(uint64_t high, uint64_t low) noexcept : _high(high), _low(low) {
82 BSONCXX_INLINE uint64_t
high()
const {
89 BSONCXX_INLINE uint64_t
low()
const {
98BSONCXX_INLINE_NAMESPACE_END
101#include <bsoncxx/config/postlude.hpp>
Represents an IEEE 754-2008 BSON Decimal128 value in a platform-independent way.
Definition decimal128.hpp:30
friend bool operator==(const decimal128 &lhs, const decimal128 &rhs)
Relational operators for decimal128.
friend bool operator!=(const decimal128 &lhs, const decimal128 &rhs)
Relational operators for decimal128.
decimal128(stdx::string_view str)
Constructs a BSON Decimal128 from a string.
decimal128()=default
Constructs a BSON Decimal128 value representing zero.
decimal128(uint64_t high, uint64_t low) noexcept
Constructs a BSON Decimal128 from high and low 64-bit big-endian parts.
Definition decimal128.hpp:45
uint64_t high() const
Accessor for high 64 bits.
Definition decimal128.hpp:82
uint64_t low() const
Accessor for low 64 bits.
Definition decimal128.hpp:89
std::string to_string() const
Converts this decimal128 value to a string representation.