MongoDB C++ Driver 4.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kvp.hpp
Go to the documentation of this file.
1// Copyright 2009-present MongoDB, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <tuple>
18
20
21namespace bsoncxx {
22namespace v_noabi {
23namespace builder {
24namespace basic {
25
30template <typename T, typename U>
31std::tuple<T&&, U&&> kvp(T&& t, U&& u) {
32 return std::tuple<T&&, U&&>(std::forward<T>(t), std::forward<U>(u));
33}
34
35} // namespace basic
36} // namespace builder
37} // namespace v_noabi
38} // namespace bsoncxx
39
40namespace bsoncxx {
41namespace builder {
42namespace basic {
43
45
46} // namespace basic
47} // namespace builder
48} // namespace bsoncxx
49
51
The bsoncxx v_noabi macro guard postlude header.
The bsoncxx v_noabi macro guard prelude header.
Declares entities used with "basic" BSON builder syntax.
Declares entities used to build BSON documents.
Declares entities used with "basic" BSON builder syntax.
std::tuple< T &&, U && > kvp(T &&t, U &&u)
Constructs a key-value pair from a string key and a BSON value.
Definition kvp.hpp:31
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.