MongoDB C++ Driver
mongocxx-3.7.0
|
Class representing a view-or-value variant type. More...
#include <view_or_value.hpp>
Public Member Functions | |
view_or_value ()=default | |
Class View must be constructible from an instance of class Value. More... | |
view_or_value (View view) | |
Construct a view_or_value from a View. More... | |
view_or_value (Value &&value) | |
Constructs a view_or_value from a Value type. More... | |
view_or_value (const view_or_value &other) | |
Construct a view_or_value from a copied view_or_value. | |
view_or_value & | operator= (const view_or_value &other) |
Assign to this view_or_value from a copied view_or_value. | |
view_or_value (view_or_value &&other) noexcept | |
Construct a view_or_value from a moved-in view_or_value. More... | |
view_or_value & | operator= (view_or_value &&other) noexcept |
Assign to this view_or_value from a moved-in view_or_value. More... | |
bool | is_owning () const noexcept |
Return whether or not this view_or_value owns an underlying Value. More... | |
operator View () const | |
This type may be used as a View. More... | |
const View & | view () const |
Get a View for the type. More... | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename View , typename Value > | |
bool | operator== (const view_or_value< View, Value > &lhs, const view_or_value< View, Value > &rhs) |
Compare view_or_value objects for (in)-equality. | |
template<typename View , typename Value > | |
bool | operator== (const view_or_value< View, Value > &lhs, View rhs) |
Mixed (in)-equality operators for view_or_value against View or Value types. | |
Class representing a view-or-value variant type.
|
default |
Class View must be constructible from an instance of class Value.
Class View must be default constructible. Default-constructs a view_or_value. This is equivalent to constructing a view_or_value with a default-constructed View.
|
inline |
Construct a view_or_value from a View.
When constructed with a View, this object is non-owning. The Value underneath the given View must outlive this object.
view | A non-owning View. |
|
inline |
Constructs a view_or_value from a Value type.
This object owns the passed-in Value.
value | A Value type. |
|
inlinenoexcept |
Construct a view_or_value from a moved-in view_or_value.
TODO CXX-800: Create a noexcept expression to check the conditions that must be met.
|
inlinenoexcept |
Return whether or not this view_or_value owns an underlying Value.
|
inline |
This type may be used as a View.
|
inlinenoexcept |
Assign to this view_or_value from a moved-in view_or_value.
TODO CXX-800: Create a noexcept expression to check the conditions that must be met.
|
inline |
Get a View for the type.