32BSONCXX_PRIVATE_WARNINGS_PUSH();
33BSONCXX_PRIVATE_WARNINGS_DISABLE(GNU(
"-Wfloat-equal"));
43enum class type : std::uint8_t {
43enum class type : std::uint8_t {
…};
119 operator double()
const {
119 operator double()
const {
…}
130 return lhs.value == rhs.value;
145 template <
typename T, detail::requires_not_t<
int, detail::is_alike<b_
string, T>> = 0>
146 explicit b_string(T&& t) : value(std::forward<T>(t)) {}
164 return lhs.value == rhs.value;
196 return lhs.value == rhs.value;
221 return lhs.value == rhs.value;
232 uint8_t
const* bytes;
241 return lhs.sub_type == rhs.sub_type && lhs.size == rhs.size &&
242 (!lhs.size || (std::memcmp(lhs.bytes, rhs.bytes, lhs.size) == 0));
278 return lhs.value == rhs.value;
292 operator bool()
const {
292 operator bool()
const {
…}
303 return lhs.value == rhs.value;
318 explicit b_date(std::chrono::milliseconds value) : value(value) {}
326 explicit b_date(std::chrono::system_clock::time_point
const& tp)
327 : value(std::chrono::duration_cast<std::chrono::milliseconds>(tp.time_since_epoch())) {}
326 explicit b_date(std::chrono::system_clock::time_point
const& tp) {
…}
329 std::chrono::milliseconds value;
334 operator int64_t()
const {
335 return value.count();
334 operator int64_t()
const {
…}
342 return value.count();
348 operator std::chrono::system_clock::time_point()
const {
349 return std::chrono::system_clock::time_point(
350 std::chrono::duration_cast<std::chrono::system_clock::duration>(value));
348 operator std::chrono::system_clock::time_point()
const {
…}
360 return lhs.value == rhs.value;
394 template <
typename T,
typename U = stdx::
string_view, detail::requires_not_t<
int, detail::is_alike<b_regex, T>> = 0>
395 explicit b_regex(T&& regex, U&& options = U{}) : regex(std::forward<T>(regex)), options(std::forward<U>(options)) {}
407 return lhs.regex == rhs.regex && lhs.options == rhs.options;
428 return lhs.collection == rhs.collection && lhs.value == rhs.value;
443 template <
typename T, detail::requires_not_t<
int, detail::is_alike<b_code, T>> = 0>
444 explicit b_code(T&& t) : code(std::forward<T>(t)) {}
462 return lhs.code == rhs.code;
479 template <
typename T, detail::requires_not_t<
int, detail::is_alike<b_symbol, T>> = 0>
480 explicit b_symbol(T&& t) : symbol(std::forward<T>(t)) {}
498 return lhs.symbol == rhs.symbol;
516 template <
typename T,
typename U, detail::requires_not_t<
int, detail::is_alike<b_codewscope, T>> = 0>
517 explicit b_codewscope(T&& code, U&& scope) : code(std::forward<T>(code)), scope(std::forward<U>(scope)) {}
529 return lhs.code == rhs.code && lhs.scope == rhs.scope;
543 operator int32_t()
const {
543 operator int32_t()
const {
…}
554 return lhs.value == rhs.value;
573 return lhs.increment == rhs.increment && lhs.timestamp == rhs.timestamp;
587 operator int64_t()
const {
587 operator int64_t()
const {
…}
598 return lhs.value == rhs.value;
615 template <
typename T, detail::requires_not_t<
int, detail::is_alike<b_decimal128, T>> = 0>
625 return lhs.value == rhs.value;
666 return !(lhs == rhs);
675 return !(lhs == rhs);
684 return !(lhs == rhs);
693 return !(lhs == rhs);
702 return !(lhs == rhs);
711 return !(lhs == rhs);
720 return !(lhs == rhs);
729 return !(lhs == rhs);
738 return !(lhs == rhs);
747 return !(lhs == rhs);
756 return !(lhs == rhs);
765 return !(lhs == rhs);
774 return !(lhs == rhs);
783 return !(lhs == rhs);
792 return !(lhs == rhs);
801 return !(lhs == rhs);
810 return !(lhs == rhs);
819 return !(lhs == rhs);
828 return !(lhs == rhs);
837 return !(lhs == rhs);
846 return !(lhs == rhs);
853BSONCXX_PRIVATE_WARNINGS_POP();
864using ::bsoncxx::v_noabi::types::operator==;
865using ::bsoncxx::v_noabi::types::operator!=;
Provides bsoncxx::v_noabi::array::view.
#define BSONCXX_ABI_EXPORT
Exports the associated entity as part of the ABI.
Definition export.hpp:15
#define BSONCXX_ABI_EXPORT_CDECL(...)
Equivalent to BSONCXX_ABI_EXPORT with BSONCXX_ABI_CDECL.
Definition export.hpp:52
The bsoncxx v_noabi macro guard postlude header.
The bsoncxx v_noabi macro guard prelude header.
A polyfill for std::string_view.
Definition string_view.hpp:411
A read-only, non-owning view of a BSON document.
Definition view.hpp:36
Represents a MongoDB BSON Decimal128.
Definition decimal128.hpp:40
A read-only, non-owning view of a BSON document.
Definition view.hpp:35
Represents a MongoDB BSON ObjectId.
Definition oid.hpp:36
Provides bsoncxx::v_noabi::decimal128.
Provides bsoncxx::v_noabi::document::view.
Declares entities representing BSON value types.
Declares entities representing BSON value types.
Declares entities whose ABI stability is NOT guaranteed.
binary_sub_type
An enumeration of each BSON binary sub type.
Definition types.hpp:72
@ k_uuid
UUID.
Definition types.hpp:77
@ k_binary_deprecated
Binary (Old).
Definition types.hpp:75
@ k_sensitive
Sensitive.
Definition types.hpp:81
@ k_md5
MD5.
Definition types.hpp:78
@ k_user
User defined.
Definition types.hpp:83
@ k_function
Function.
Definition types.hpp:74
@ k_column
Compressed BSON column.
Definition types.hpp:80
@ k_uuid_deprecated
UUID (Old).
Definition types.hpp:76
@ k_encrypted
Encrypted BSON value.
Definition types.hpp:79
@ k_vector
BSON Binary Vector.
Definition types.hpp:82
std::string to_string(type rhs)
Returns a stringification of the given type.
type
An enumeration of each BSON type.
Definition types.hpp:43
@ k_decimal128
128-bit decimal floating point.
Definition types.hpp:62
@ k_minkey
Max key.
Definition types.hpp:64
@ k_double
64-bit binary floating point.
Definition types.hpp:44
@ k_dbpointer
DBPointer.
Definition types.hpp:55
@ k_int64
64-bit integer.
Definition types.hpp:61
@ k_codewscope
JavaScript code with scope.
Definition types.hpp:58
@ k_regex
Regular expression.
Definition types.hpp:54
@ k_string
UTF-8 string.
Definition types.hpp:45
@ k_array
Array.
Definition types.hpp:47
@ k_bool
Boolean.
Definition types.hpp:51
@ k_symbol
Symbol.
Definition types.hpp:57
@ k_oid
ObjectId.
Definition types.hpp:50
@ k_date
UTC datetime.
Definition types.hpp:52
@ k_int32
32-bit integer.
Definition types.hpp:59
@ k_timestamp
Timestamp.
Definition types.hpp:60
@ k_undefined
Undefined value.
Definition types.hpp:49
@ k_code
JavaScript code.
Definition types.hpp:56
@ k_document
Embedded document.
Definition types.hpp:46
@ k_maxkey
Min key.
Definition types.hpp:63
@ k_binary
Binary data.
Definition types.hpp:48
@ k_null
Null value.
Definition types.hpp:53
The top-level namespace within which all bsoncxx library entities are declared.
Provides bsoncxx::v_noabi::oid.
b_code(T &&t)
Constructor for b_code.
Definition types.hpp:444
b_codewscope(T &&code, U &&scope)
Constructor for b_codewscope.
Definition types.hpp:517
b_date(std::chrono::milliseconds value)
Constructor for b_date.
Definition types.hpp:318
b_decimal128(T &&t)
Constructor for b_decimal128.
Definition types.hpp:616
b_regex(T &®ex, U &&options=U{})
Constructor for b_regex.
Definition types.hpp:395
b_string(T &&t)
Constructor for b_string.
Definition types.hpp:146
b_symbol(T &&t)
Constructor for b_symbol.
Definition types.hpp:480
A BSON array value.
Definition types.hpp:202
bool operator==(b_array const &lhs, b_array const &rhs)
free function comparator for b_array
Definition types.hpp:220
bool operator!=(b_array const &lhs, b_array const &rhs)
free function comparator for b_array
Definition types.hpp:692
A BSON binary data value.
Definition types.hpp:227
bool operator==(b_binary const &lhs, b_binary const &rhs)
free function comparator for b_binary
Definition types.hpp:240
bool operator!=(b_binary const &lhs, b_binary const &rhs)
free function comparator for b_binary
Definition types.hpp:701
A BSON boolean value.
Definition types.hpp:284
bool operator!=(b_bool const &lhs, b_bool const &rhs)
free function comparator for b_bool
Definition types.hpp:728
bool operator==(b_bool const &lhs, b_bool const &rhs)
free function comparator for b_bool
Definition types.hpp:302
bool operator!=(b_code const &lhs, b_code const &rhs)
free function comparator for b_code
Definition types.hpp:773
bool operator==(b_code const &lhs, b_code const &rhs)
free function comparator for b_code
Definition types.hpp:461
b_code(T &&t)
Constructor for b_code.
Definition types.hpp:444
bool operator==(b_codewscope const &lhs, b_codewscope const &rhs)
free function comparator for b_codewscope
Definition types.hpp:528
bool operator!=(b_codewscope const &lhs, b_codewscope const &rhs)
free function comparator for b_codewscope
Definition types.hpp:791
b_codewscope(T &&code, U &&scope)
Constructor for b_codewscope.
Definition types.hpp:517
bool operator==(b_date const &lhs, b_date const &rhs)
free function comparator for b_date
Definition types.hpp:359
bool operator!=(b_date const &lhs, b_date const &rhs)
free function comparator for b_date
Definition types.hpp:737
int64_t to_int64() const
Manually convert this b_date to an int64_t.
Definition types.hpp:341
b_date(std::chrono::system_clock::time_point const &tp)
Constructor for b_date.
Definition types.hpp:326
b_date(std::chrono::milliseconds value)
Constructor for b_date.
Definition types.hpp:318
A BSON DBPointer (aka DBRef) value.
Definition types.hpp:415
bool operator==(b_dbpointer const &lhs, b_dbpointer const &rhs)
free function comparator for b_dbpointer
Definition types.hpp:427
bool operator!=(b_dbpointer const &lhs, b_dbpointer const &rhs)
free function comparator for b_dbpointer
Definition types.hpp:764
bool operator!=(b_decimal128 const &lhs, b_decimal128 const &rhs)
free function comparator for b_decimal128
Definition types.hpp:827
bool operator==(b_decimal128 const &lhs, b_decimal128 const &rhs)
free function comparator for b_decimal128
Definition types.hpp:624
b_decimal128(T &&t)
Constructor for b_decimal128.
Definition types.hpp:616
A BSON document value.
Definition types.hpp:170
bool operator==(b_document const &lhs, b_document const &rhs)
free function comparator for b_document
Definition types.hpp:195
document::view view()
Returns an unwrapped document::view.
Definition types.hpp:185
bool operator!=(b_document const &lhs, b_document const &rhs)
free function comparator for b_document
Definition types.hpp:683
A BSON double value.
Definition types.hpp:111
bool operator!=(b_double const &lhs, b_double const &rhs)
free function comparator for b_double
Definition types.hpp:665
bool operator==(b_double const &lhs, b_double const &rhs)
free function comparator for b_double
Definition types.hpp:129
A BSON signed 32-bit integer value.
Definition types.hpp:535
bool operator==(b_int32 const &lhs, b_int32 const &rhs)
free function comparator for b_int32
Definition types.hpp:553
bool operator!=(b_int32 const &lhs, b_int32 const &rhs)
free function comparator for b_int32
Definition types.hpp:800
A BSON 64-bit signed integer value.
Definition types.hpp:579
bool operator!=(b_int64 const &lhs, b_int64 const &rhs)
free function comparator for b_int64
Definition types.hpp:818
bool operator==(b_int64 const &lhs, b_int64 const &rhs)
free function comparator for b_int64
Definition types.hpp:597
A BSON max-key value.
Definition types.hpp:647
bool operator!=(b_maxkey const &lhs, b_maxkey const &rhs)
free function comparator for b_maxkey
Definition types.hpp:845
bool operator==(b_maxkey const &, b_maxkey const &)
free function comparator for b_maxkey
Definition types.hpp:656
A BSON min-key value.
Definition types.hpp:631
bool operator==(b_minkey const &, b_minkey const &)
free function comparator for b_minkey
Definition types.hpp:640
bool operator!=(b_minkey const &lhs, b_minkey const &rhs)
free function comparator for b_minkey
Definition types.hpp:836
A BSON null value.
Definition types.hpp:366
bool operator==(b_null const &, b_null const &)
free function comparator for b_null
Definition types.hpp:375
bool operator!=(b_null const &lhs, b_null const &rhs)
free function comparator for b_null
Definition types.hpp:746
A BSON ObjectId value.
Definition types.hpp:266
bool operator==(b_oid const &lhs, b_oid const &rhs)
free function comparator for b_oid
Definition types.hpp:277
bool operator!=(b_oid const &lhs, b_oid const &rhs)
free function comparator for b_oid
Definition types.hpp:719
bool operator!=(b_regex const &lhs, b_regex const &rhs)
free function comparator for b_regex
Definition types.hpp:755
b_regex(T &®ex, U &&options=U{})
Constructor for b_regex.
Definition types.hpp:395
bool operator==(b_regex const &lhs, b_regex const &rhs)
free function comparator for b_regex
Definition types.hpp:406
b_string(T &&t)
Constructor for b_string.
Definition types.hpp:146
bool operator==(b_string const &lhs, b_string const &rhs)
free function comparator for b_string
Definition types.hpp:163
bool operator!=(b_string const &lhs, b_string const &rhs)
free function comparator for b_string
Definition types.hpp:674
b_symbol(T &&t)
Constructor for b_symbol.
Definition types.hpp:480
bool operator==(b_symbol const &lhs, b_symbol const &rhs)
free function comparator for b_symbol
Definition types.hpp:497
bool operator!=(b_symbol const &lhs, b_symbol const &rhs)
free function comparator for b_symbol
Definition types.hpp:782
A BSON replication timestamp value.
Definition types.hpp:560
bool operator==(b_timestamp const &lhs, b_timestamp const &rhs)
free function comparator for b_timestamp
Definition types.hpp:572
bool operator!=(b_timestamp const &lhs, b_timestamp const &rhs)
free function comparator for b_timestamp
Definition types.hpp:809
A BSON undefined value.
Definition types.hpp:250
bool operator!=(b_undefined const &lhs, b_undefined const &rhs)
free function comparator for b_undefined
Definition types.hpp:710
bool operator==(b_undefined const &, b_undefined const &)
free function comparator for b_undefined
Definition types.hpp:259
Declares entities used to represent BSON types.
Provides std::string_view-related polyfills for library API usage.