MongoDB C++ Driver current
Loading...
Searching...
No Matches
bsoncxx::v1::types::b_bool Struct Reference

#include <bsoncxx/v1/types/view.hpp>

Description

BSON type value "Boolean".

Public Member Functions

 b_bool ()=default
 Zero-initialize the represented value.
 b_bool (bool value)
 Initialize with value.
 operator bool () const
 Implicitly convert to value.

Public Attributes

bool value = false
 The represented value.

Static Public Attributes

static constexpr id type_id = id::k_bool
 The type represented by this BSON type value.

Friends

bool operator!= (b_bool const &lhs, b_bool const &rhs)
 Equivalent to !(lhs == rhs).
bool operator== (b_bool const &lhs, b_bool const &rhs)
 Equivalent to lhs.value == rhs.value.

Constructor & Destructor Documentation

◆ b_bool() [1/2]

bsoncxx::v1::types::b_bool::b_bool ( )
default

Zero-initialize the represented value.

◆ b_bool() [2/2]

bsoncxx::v1::types::b_bool::b_bool ( bool value)
inlineexplicit

Initialize with value.

Member Function Documentation

◆ operator bool()

bsoncxx::v1::types::b_bool::operator bool ( ) const
inline

Implicitly convert to value.

◆ operator!=

bool operator!= ( b_bool const & lhs,
b_bool const & rhs )
friend

Equivalent to !(lhs == rhs).

◆ operator==

bool operator== ( b_bool const & lhs,
b_bool const & rhs )
friend

Equivalent to lhs.value == rhs.value.

Member Data Documentation

◆ type_id

id bsoncxx::v1::types::b_bool::type_id = id::k_bool
staticconstexpr

The type represented by this BSON type value.

◆ value

bool bsoncxx::v1::types::b_bool::value = false

The represented value.


The documentation for this struct was generated from the following file: