MongoDB C++ Driver
mongocxx-3.7.0
|
19 #include <bsoncxx/stdx/string_view.hpp>
20 #include <bsoncxx/view_or_value.hpp>
22 #include <bsoncxx/config/prelude.hpp>
25 BSONCXX_INLINE_NAMESPACE_BEGIN
90 const char* data()
const;
101 return lhs.
view() == stdx::string_view(rhs);
104 BSONCXX_INLINE
bool operator!=(
const view_or_value& lhs,
const char* rhs) {
105 return !(lhs == rhs);
108 BSONCXX_INLINE
bool operator==(
const char* lhs,
const view_or_value& rhs) {
112 BSONCXX_INLINE
bool operator!=(
const char* lhs,
const view_or_value& rhs) {
113 return !(rhs == lhs);
120 BSONCXX_INLINE_NAMESPACE_END
123 #include <bsoncxx/config/postlude.hpp>
Top level namespace for MongoDB C++ BSON functionality.
Definition: element.hpp:24
Class representing a view-or-value variant type.
Definition: view_or_value.hpp:30
const View & view() const
Get a View for the type.
Definition: view_or_value.hpp:131
view_or_value(const std::string &str)
Allow construction with an l-value reference to a std::string.
Definition: view_or_value.hpp:68
Class representing a view-or-value variant type for strings.
Definition: view_or_value.hpp:36
bool operator==(const view_or_value &lhs, const char *rhs)
Comparison operators for comparing string::view_or_value directly with const char *.
Definition: view_or_value.hpp:100
view_or_value(const char *str)
Construct a string::view_or_value using a null-terminated const char *.
Definition: view_or_value.hpp:55