32BSONCXX_PUSH_WARNINGS();
 
   33BSONCXX_DISABLE_WARNING(GNU(
"-Wfloat-equal"));
 
   43enum class type : std::uint8_t {
 
 
  118    operator double()
 const {
 
 
 
  129    return lhs.value == rhs.value;
 
 
  144    template <
typename T, detail::requires_not_t<
int, detail::is_alike<b_
string, T>> = 0>
 
 
  163    return lhs.value == rhs.value;
 
 
  195    return lhs.value == rhs.value;
 
 
  220    return lhs.value == rhs.value;
 
 
  231    const uint8_t* bytes;
 
 
  240    return lhs.sub_type == rhs.sub_type && lhs.size == rhs.size &&
 
  241           (!lhs.size || (std::memcmp(lhs.bytes, rhs.bytes, lhs.size) == 0));
 
 
  277    return lhs.value == rhs.value;
 
 
  291    operator bool()
 const {
 
 
 
  302    return lhs.value == rhs.value;
 
 
  317    explicit b_date(std::chrono::milliseconds value) : value(value) {}
 
  325    explicit b_date(
const std::chrono::system_clock::time_point& tp)
 
  326        : value(
std::chrono::duration_cast<
std::chrono::milliseconds>(tp.time_since_epoch())) {}
 
 
  328    std::chrono::milliseconds value;
 
  333    operator int64_t()
 const {
 
  334        return value.count();
 
 
  341        return value.count();
 
 
  347    operator std::chrono::system_clock::time_point()
 const {
 
  348        return std::chrono::system_clock::time_point(
 
  349            std::chrono::duration_cast<std::chrono::system_clock::duration>(value));
 
 
 
  359    return lhs.value == rhs.value;
 
 
  393    template <
typename T,
 
  395              detail::requires_not_t<int, detail::is_alike<b_regex, T>> = 0>
 
  396    explicit b_regex(T&& regex, U&& options = U{})
 
  397        : regex(
std::forward<T>(regex)), options(
std::forward<U>(options)) {}
 
 
 
  409    return lhs.regex == rhs.regex && lhs.options == rhs.options;
 
 
  430    return lhs.collection == rhs.collection && lhs.value == rhs.value;
 
 
  445    template <
typename T, detail::requires_not_t<
int, detail::is_alike<b_code, T>> = 0>
 
 
  464    return lhs.code == rhs.code;
 
 
  481    template <
typename T, detail::requires_not_t<
int, detail::is_alike<b_symbol, T>> = 0>
 
 
  500    return lhs.symbol == rhs.symbol;
 
 
  518    template <
typename T,
 
  520              detail::requires_not_t<int, detail::is_alike<b_codewscope, T>> = 0>
 
  522        : code(
std::forward<T>(code)), scope(
std::forward<U>(scope)) {}
 
 
 
  534    return lhs.code == rhs.code && lhs.scope == rhs.scope;
 
 
  548    operator int32_t()
 const {
 
 
 
  559    return lhs.value == rhs.value;
 
 
  578    return lhs.increment == rhs.increment && lhs.timestamp == rhs.timestamp;
 
 
  592    operator int64_t()
 const {
 
 
 
  603    return lhs.value == rhs.value;
 
 
  620    template <
typename T, detail::requires_not_t<
int, detail::is_alike<b_decimal128, T>> = 0>
 
 
  630    return lhs.value == rhs.value;
 
 
  671    return !(lhs == rhs);
 
 
  680    return !(lhs == rhs);
 
 
  689    return !(lhs == rhs);
 
 
  698    return !(lhs == rhs);
 
 
  707    return !(lhs == rhs);
 
 
  716    return !(lhs == rhs);
 
 
  725    return !(lhs == rhs);
 
 
  734    return !(lhs == rhs);
 
 
  743    return !(lhs == rhs);
 
 
  752    return !(lhs == rhs);
 
 
  761    return !(lhs == rhs);
 
 
  770    return !(lhs == rhs);
 
 
  779    return !(lhs == rhs);
 
 
  788    return !(lhs == rhs);
 
 
  797    return !(lhs == rhs);
 
 
  806    return !(lhs == rhs);
 
 
  815    return !(lhs == rhs);
 
 
  824    return !(lhs == rhs);
 
 
  833    return !(lhs == rhs);
 
 
  842    return !(lhs == rhs);
 
 
  851    return !(lhs == rhs);
 
 
  858BSONCXX_POP_WARNINGS();
 
  862using ::bsoncxx::v_noabi::to_string;
 
  869using ::bsoncxx::v_noabi::types::operator==;
 
  870using ::bsoncxx::v_noabi::types::operator!=;
 
  882#if defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR) 
Provides bsoncxx::v_noabi::array::view.
 
The bsoncxx macro guard postlude header.
 
The bsoncxx macro guard prelude header.
 
A read-only, non-owning view of a BSON document.
Definition view.hpp:36
 
Represents an IEEE 754-2008 BSON Decimal128 value in a platform-independent way.
Definition decimal128.hpp:32
 
A read-only, non-owning view of a BSON document.
Definition view.hpp:35
 
Represents a MongoDB ObjectId. As this BSON type is used within the MongoDB server as a primary key f...
Definition oid.hpp:41
 
A polyfill for std::string_view.
Definition string_view.hpp:436
 
Provides bsoncxx::v_noabi::decimal128.
 
Provides bsoncxx::v_noabi::document::view.
 
#define BSONCXX_ABI_EXPORT
Exports the associated entity as part of the ABI.
Definition fwd.hpp:153
 
#define BSONCXX_ABI_EXPORT_CDECL(...)
Equivalent to BSONCXX_ABI_EXPORT with BSONCXX_ABI_CDECL.
Definition fwd.hpp:177
 
bool operator!=(const v_noabi::types::b_double &lhs, const v_noabi::types::b_double &rhs)
bsoncxx::v_noabi::types::operator!=(const v_noabi::types::b_double& lhs, const v_noabi::types::b_doub...
 
bool operator==(const v_noabi::types::b_double &lhs, const v_noabi::types::b_double &rhs)
bsoncxx::v_noabi::types::operator==(const v_noabi::types::b_double& lhs, const v_noabi::types::b_doub...
 
binary_sub_type
An enumeration of each BSON binary sub type.
Definition types.hpp:72
 
@ k_binary_deprecated
Binary (Old).
 
@ k_column
Compressed BSON column.
 
@ k_uuid_deprecated
UUID (Old).
 
@ k_encrypted
Encrypted BSON value.
 
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.
 
@ k_double
64-bit binary floating point.
 
@ k_codewscope
JavaScript code with scope.
 
@ k_regex
Regular expression.
 
@ k_undefined
Undefined value.
 
@ k_document
Embedded document.
 
The top-level namespace within which all bsoncxx library entities are declared.
 
std::string to_string(v_noabi::type rhs)
bsoncxx::v_noabi::to_string(v_noabi::type rhs)
 
The top-level namespace reserved for the C++ standard library.
 
Provides bsoncxx::v_noabi::oid.
 
Provides std::string_view-related polyfills for library API usage.
 
A BSON array value.
Definition types.hpp:201
 
bool operator==(const b_array &lhs, const b_array &rhs)
free function comparator for b_array
Definition types.hpp:219
 
bool operator!=(const b_array &lhs, const b_array &rhs)
free function comparator for b_array
Definition types.hpp:697
 
A BSON binary data value.
Definition types.hpp:226
 
bool operator==(const b_binary &lhs, const b_binary &rhs)
free function comparator for b_binary
Definition types.hpp:239
 
bool operator!=(const b_binary &lhs, const b_binary &rhs)
free function comparator for b_binary
Definition types.hpp:706
 
A BSON boolean value.
Definition types.hpp:283
 
bool operator!=(const b_bool &lhs, const b_bool &rhs)
free function comparator for b_bool
Definition types.hpp:733
 
bool operator==(const b_bool &lhs, const b_bool &rhs)
free function comparator for b_bool
Definition types.hpp:301
 
A BSON JavaScript code value.
Definition types.hpp:436
 
bool operator==(const b_code &lhs, const b_code &rhs)
free function comparator for b_code
Definition types.hpp:463
 
bool operator!=(const b_code &lhs, const b_code &rhs)
free function comparator for b_code
Definition types.hpp:778
 
b_code(T &&t)
Constructor for b_code.
Definition types.hpp:446
 
A BSON JavaScript code with scope value.
Definition types.hpp:506
 
bool operator!=(const b_codewscope &lhs, const b_codewscope &rhs)
free function comparator for b_codewscope
Definition types.hpp:796
 
bool operator==(const b_codewscope &lhs, const b_codewscope &rhs)
free function comparator for b_codewscope
Definition types.hpp:533
 
b_codewscope(T &&code, U &&scope)
Constructor for b_codewscope.
Definition types.hpp:521
 
A BSON date value.
Definition types.hpp:308
 
bool operator==(const b_date &lhs, const b_date &rhs)
free function comparator for b_date
Definition types.hpp:358
 
b_date(const std::chrono::system_clock::time_point &tp)
Constructor for b_date.
Definition types.hpp:325
 
int64_t to_int64() const
Manually convert this b_date to an int64_t.
Definition types.hpp:340
 
bool operator!=(const b_date &lhs, const b_date &rhs)
free function comparator for b_date
Definition types.hpp:742
 
b_date(std::chrono::milliseconds value)
Constructor for b_date.
Definition types.hpp:317
 
A BSON DBPointer (aka DBRef) value.
Definition types.hpp:417
 
bool operator==(const b_dbpointer &lhs, const b_dbpointer &rhs)
free function comparator for b_dbpointer
Definition types.hpp:429
 
bool operator!=(const b_dbpointer &lhs, const b_dbpointer &rhs)
free function comparator for b_dbpointer
Definition types.hpp:769
 
A BSON Decimal128 value.
Definition types.hpp:609
 
bool operator!=(const b_decimal128 &lhs, const b_decimal128 &rhs)
free function comparator for b_decimal128
Definition types.hpp:832
 
bool operator==(const b_decimal128 &lhs, const b_decimal128 &rhs)
free function comparator for b_decimal128
Definition types.hpp:629
 
b_decimal128(T &&t)
Constructor for b_decimal128.
Definition types.hpp:621
 
A BSON document value.
Definition types.hpp:169
 
bool operator!=(const b_document &lhs, const b_document &rhs)
free function comparator for b_document
Definition types.hpp:688
 
document::view view()
Returns an unwrapped document::view.
Definition types.hpp:184
 
bool operator==(const b_document &lhs, const b_document &rhs)
free function comparator for b_document
Definition types.hpp:194
 
A BSON double value.
Definition types.hpp:110
 
bool operator==(const b_double &lhs, const b_double &rhs)
free function comparator for b_double
Definition types.hpp:128
 
bool operator!=(const b_double &lhs, const b_double &rhs)
free function comparator for b_double
Definition types.hpp:670
 
A BSON signed 32-bit integer value.
Definition types.hpp:540
 
bool operator==(const b_int32 &lhs, const b_int32 &rhs)
free function comparator for b_int32
Definition types.hpp:558
 
bool operator!=(const b_int32 &lhs, const b_int32 &rhs)
free function comparator for b_int32
Definition types.hpp:805
 
A BSON 64-bit signed integer value.
Definition types.hpp:584
 
bool operator==(const b_int64 &lhs, const b_int64 &rhs)
free function comparator for b_int64
Definition types.hpp:602
 
bool operator!=(const b_int64 &lhs, const b_int64 &rhs)
free function comparator for b_int64
Definition types.hpp:823
 
A BSON max-key value.
Definition types.hpp:652
 
bool operator!=(const b_maxkey &lhs, const b_maxkey &rhs)
free function comparator for b_maxkey
Definition types.hpp:850
 
bool operator==(const b_maxkey &, const b_maxkey &)
free function comparator for b_maxkey
Definition types.hpp:661
 
A BSON min-key value.
Definition types.hpp:636
 
bool operator!=(const b_minkey &lhs, const b_minkey &rhs)
free function comparator for b_minkey
Definition types.hpp:841
 
bool operator==(const b_minkey &, const b_minkey &)
free function comparator for b_minkey
Definition types.hpp:645
 
A BSON null value.
Definition types.hpp:365
 
bool operator!=(const b_null &lhs, const b_null &rhs)
free function comparator for b_null
Definition types.hpp:751
 
bool operator==(const b_null &, const b_null &)
free function comparator for b_null
Definition types.hpp:374
 
A BSON ObjectId value.
Definition types.hpp:265
 
bool operator==(const b_oid &lhs, const b_oid &rhs)
free function comparator for b_oid
Definition types.hpp:276
 
bool operator!=(const b_oid &lhs, const b_oid &rhs)
free function comparator for b_oid
Definition types.hpp:724
 
A BSON regex value.
Definition types.hpp:381
 
bool operator!=(const b_regex &lhs, const b_regex &rhs)
free function comparator for b_regex
Definition types.hpp:760
 
bool operator==(const b_regex &lhs, const b_regex &rhs)
free function comparator for b_regex
Definition types.hpp:408
 
b_regex(T &®ex, U &&options=U{})
Constructor for b_regex.
Definition types.hpp:396
 
A BSON UTF-8 encoded string value.
Definition types.hpp:135
 
b_string(T &&t)
Constructor for b_string.
Definition types.hpp:145
 
bool operator!=(const b_string &lhs, const b_string &rhs)
free function comparator for b_string
Definition types.hpp:679
 
bool operator==(const b_string &lhs, const b_string &rhs)
free function comparator for b_string
Definition types.hpp:162
 
A BSON Symbol value.
Definition types.hpp:472
 
b_symbol(T &&t)
Constructor for b_symbol.
Definition types.hpp:482
 
bool operator==(const b_symbol &lhs, const b_symbol &rhs)
free function comparator for b_symbol
Definition types.hpp:499
 
bool operator!=(const b_symbol &lhs, const b_symbol &rhs)
free function comparator for b_symbol
Definition types.hpp:787
 
A BSON replication timestamp value.
Definition types.hpp:565
 
bool operator!=(const b_timestamp &lhs, const b_timestamp &rhs)
free function comparator for b_timestamp
Definition types.hpp:814
 
bool operator==(const b_timestamp &lhs, const b_timestamp &rhs)
free function comparator for b_timestamp
Definition types.hpp:577
 
A BSON undefined value.
Definition types.hpp:249
 
bool operator!=(const b_undefined &lhs, const b_undefined &rhs)
free function comparator for b_undefined
Definition types.hpp:715
 
bool operator==(const b_undefined &, const b_undefined &)
free function comparator for b_undefined
Definition types.hpp:258
 
Provides <type_traits>-related polyfills for internal use.
 
Declares entities used to represent BSON types.