21#include <bsoncxx/types.hpp>
23#include <bsoncxx/config/prelude.hpp>
26BSONCXX_INLINE_NAMESPACE_BEGIN
357 void BSONCXX_PRIVATE destroy() noexcept;
389 typename std::enable_if<!std::is_same<typename std::remove_reference<T>::type, value>::value,
394BSONCXX_INLINE not_value<T> operator==(
const value& lhs, T&& rhs) {
395 return lhs == value{std::forward<T>(rhs)};
399BSONCXX_INLINE not_value<T> operator==(T&& lhs,
const value& rhs) {
400 return value{std::forward<T>(lhs)} == rhs;
404BSONCXX_INLINE not_value<T> operator!=(
const value& lhs, T&& rhs) {
405 return lhs != value{std::forward<T>(rhs)};
409BSONCXX_INLINE not_value<T> operator!=(T&& lhs,
const value& rhs) {
410 return value{std::forward<T>(lhs)} != rhs;
415BSONCXX_INLINE_NAMESPACE_END
418#include <bsoncxx/config/postlude.hpp>
A variant that can contain any BSON type.
Definition value.hpp:37
friend bool operator==(const value &, const value &)
Compare two values for equality.
const b_minkey & get_minkey() const
value(b_symbol) noexcept
Construct a value from a BSON symbol.
const b_double & get_double() const
const b_timestamp & get_timestamp() const
bsoncxx::type type() const
value(b_timestamp) noexcept
Construct a value from a BSON replication timestamp.
const b_bool & get_bool() const
value(b_utf8) noexcept
Construct a value from a BSON UTF-8 string.
value(b_double) noexcept
Construct a value from a BSON double.
const b_oid & get_oid() const
const b_dbpointer & get_dbpointer() const
value(b_codewscope) noexcept
Construct a value from a BSON JavaScript code with scope.
const b_int32 & get_int32() const
value(b_oid) noexcept
Construct a value from a BSON ObjectId.
const b_null & get_null() const
const b_maxkey & get_maxkey() const
value(b_document) noexcept
Construct a value from a BSON document.
value(b_binary) noexcept
Construct a value from a BSON binary datum.
const b_decimal128 & get_decimal128() const
value(b_dbpointer) noexcept
Construct a value from a BSON DBPointer.
value(b_undefined) noexcept
Construct a value from a BSON undefined.
const b_int64 & get_int64() const
const b_binary & get_binary() const
const b_document & get_document() const
value(b_array) noexcept
Construct a value from a BSON array.
value(b_maxkey) noexcept
Construct a value from a BSON max-key.
value(b_int32) noexcept
Construct a value from a BSON 32-bit signed integer.
const b_symbol & get_symbol() const
const b_regex & get_regex() const
value(b_decimal128) noexcept
Construct a value from a BSON Decimal128.
value(b_date) noexcept
Construct a value from a BSON date.
value(b_null) noexcept
Construct a value from a BSON null.
const b_code & get_code() const
value(b_regex) noexcept
Construct a value from a BSON regex.
const b_date & get_date() const
const b_utf8 & get_utf8() const
const b_codewscope & get_codewscope() const
const b_undefined & get_undefined() const
value(b_bool) noexcept
Construct a value from a BSON boolean.
const b_array & get_array() const
value(b_int64) noexcept
Construct a value from a BSON 64-bit signed integer.
value(b_code) noexcept
Construct a value from a BSON JavaScript code.
friend bool operator!=(const value &, const value &)
Compare two values for equality.
value(b_minkey) noexcept
Construct a value from a BSON min-key.
A BSON array value.
Definition types.hpp:180
A BSON binary data value.
Definition types.hpp:205
A BSON boolean value.
Definition types.hpp:263
A BSON JavaScript code value.
Definition types.hpp:420
A BSON JavaScript code with scope value.
Definition types.hpp:499
A BSON date value.
Definition types.hpp:288
A BSON DBPointer value.
Definition types.hpp:401
A BSON Decimal128 value.
Definition types.hpp:605
A BSON document value.
Definition types.hpp:148
A BSON double value.
Definition types.hpp:85
A BSON signed 32-bit integer value.
Definition types.hpp:532
A BSON 64-bit signed integer value.
Definition types.hpp:580
A BSON max-key value.
Definition types.hpp:652
A BSON min-key value.
Definition types.hpp:636
A BSON null value.
Definition types.hpp:349
A BSON ObjectId value.
Definition types.hpp:245
A BSON regex value.
Definition types.hpp:365
A BSON Symbol value.
Definition types.hpp:461
A BSON replication timestamp value.
Definition types.hpp:561
A BSON undefined value.
Definition types.hpp:229
A BSON UTF-8 encoded string value.
Definition types.hpp:110