71 template <std::
size_t n>
74 return value_context<key_context>(_core);
87 value_context<key_context>
operator<<(std::string str) {
89 return value_context<key_context>(_core);
104 return value_context<key_context>(_core);
115 template <
typename T>
116 detail::requires_t<key_context&, detail::is_invocable<T, key_context>>
operator<<(T&& func) {
117 detail::invoke(std::forward<T>(func), *
this);
131 template <
typename T>
133 bsoncxx::v_noabi::document::value,
134 std::is_same<base, closed_context>,
135 detail::is_alike<T, finalize_type>>
137 return _core->extract_document();
150 _core->concatenate(doc);
160 _core->close_document();
The bsoncxx v_noabi macro guard postlude header.
The bsoncxx v_noabi macro guard prelude header.
key_context(core *core)
Create a key_context given a core builder.
Definition key_context.hpp:59
A polyfill for std::string_view.
Definition string_view.hpp:411
A low-level interface for constructing BSON documents and arrays.
Definition core.hpp:46
core & key_owned(std::string key)
Appends a key passed as an STL string. Transfers ownership of the key to this class.
core & key_view(stdx::string_view key)
Appends a key passed as a non-owning stdx::string_view.
key_context operator<<(concatenate_doc doc)
<< operator for concatenating another document.
Definition key_context.hpp:149
value_context< key_context > operator<<(char const (&v)[n])
<< operator for accepting a literal key and appending it to the core builder.
Definition key_context.hpp:72
base operator<<(close_document_type const)
<< operator for closing a subdocument in the core builder.
Definition key_context.hpp:159
key_context(core *core)
Create a key_context given a core builder.
Definition key_context.hpp:59
A stream context which expects a value.
Definition value_context.hpp:51
Declares bsoncxx::v_noabi::builder::stream::closed_context.
Provides bsoncxx::v_noabi::builder::core.
Declares bsoncxx::v_noabi::builder::stream::key_context.
Declares entities used with "streaming" BSON builder syntax.
Declares entities used to build BSON documents.
Declares entities whose ABI stability is NOT guaranteed.
The top-level namespace within which all bsoncxx library entities are declared.
Container to concatenate a document.
Definition concatenate.hpp:34
The type of a stream manipulator to close a subdocument.
Definition helpers.hpp:41
Provides std::string_view-related polyfills for library API usage.
Provides bsoncxx::v_noabi::builder::stream::value_context.