MongoDB C++ Driver 4.3.0
Loading...
Searching...
No Matches
bsoncxx::v1::types::b_date Struct Reference

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

Description

BSON type value "UTC Datetime".

Attention
This feature is experimental! It is not ready for use!

Public Member Functions

 b_date ()=default
 Zero-initialize the represented value.
 b_date (std::chrono::milliseconds value)
 Initialize with value (milliseconds relative to the Unix epoch).
 b_date (std::chrono::system_clock::time_point tp)
 Initialize with tp (assuming the epoch of std::chrono::system_clock is the Unix epoch).

Public Attributes

std::chrono::milliseconds value = {}
 The represented value (milliseconds relative to the Unix epoch).

Static Public Attributes

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

Friends

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

Constructor & Destructor Documentation

◆ b_date() [1/3]

bsoncxx::v1::types::b_date::b_date ( )
default

Zero-initialize the represented value.

◆ b_date() [2/3]

bsoncxx::v1::types::b_date::b_date ( std::chrono::milliseconds value)
inlineexplicit

Initialize with value (milliseconds relative to the Unix epoch).

◆ b_date() [3/3]

bsoncxx::v1::types::b_date::b_date ( std::chrono::system_clock::time_point tp)
inlineexplicit

Initialize with tp (assuming the epoch of std::chrono::system_clock is the Unix epoch).

◆ operator!=

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

Equivalent to !(lhs == rhs).

◆ operator==

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

Equivalent to lhs.value == rhs.value.

Member Data Documentation

◆ type_id

id bsoncxx::v1::types::b_date::type_id = id::k_date
staticconstexpr

The type represented by this BSON type value.

◆ value

std::chrono::milliseconds bsoncxx::v1::types::b_date::value = {}

The represented value (milliseconds relative to the Unix epoch).


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