28#include <system_error>
41 std::uint64_t _high = 0u;
42 std::uint64_t _low = 0u;
76 std::uint64_t
high()
const {
83 std::uint64_t
low()
const {
92 return lhs._high == rhs._high && lhs._low == rhs._low;
134struct std::is_error_code_enum<
bsoncxx::v1::decimal128::errc> : true_type {};
Provides macros to control the set of symbols exported in the ABI.
#define BSONCXX_ABI_EXPORT_CDECL(...)
Equivalent to BSONCXX_ABI_EXPORT with BSONCXX_ABI_CDECL.
Definition export.hpp:52
The bsoncxx v1 macro guard postlude header.
The bsoncxx v1 macro guard prelude header.
decimal128(std::uint64_t high, std::uint64_t low)
Initialize with the given high and low byte representations.
Definition decimal128.hpp:55
errc
Errors codes which may be returned by bsoncxx::v1::decimal128.
Definition decimal128.hpp:106
@ invalid_string_data
String is not a valid Decimal128 representation.
Definition decimal128.hpp:110
@ invalid_string_length
Length of string is too long (exceeds INT_MAX).
Definition decimal128.hpp:109
@ empty_string
String must not be empty.
Definition decimal128.hpp:108
@ zero
Zero.
Definition decimal128.hpp:107
friend bool operator!=(decimal128 const &lhs, decimal128 const &rhs)
Compare equal when the byte representations compare equal.
Definition decimal128.hpp:95
decimal128()=default
Zero-initialize the byte representation.
std::uint64_t low() const
Return the low-order bytes.
Definition decimal128.hpp:83
friend std::error_code make_error_code(errc v)
Support implicit conversion to std::error_code.
Definition decimal128.hpp:125
friend bool operator==(decimal128 const &lhs, decimal128 const &rhs)
Compare equal when the byte representations compare equal.
Definition decimal128.hpp:91
static std::error_category const & error_category()
The error category for bsoncxx::v1::decimal128::errc.
std::uint64_t high() const
Return the high-order bytes.
Definition decimal128.hpp:76
std::string to_string() const
Return the string representation.
Declares C++17 standard library polyfills.
Declares entities whose ABI stability is guaranteed for documented symbols.
The top-level namespace within which all bsoncxx library entities are declared.
Declares bsoncxx::v1::decimal128.
Provides std::string_view-related polyfills for library API usage.