MongoDB C++ Driver mongocxx-4.0.0
Loading...
Searching...
No Matches
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
44using ::bsoncxx::v_noabi::builder::basic::kvp;
45
46} // namespace basic
47} // namespace builder
48} // namespace bsoncxx
49
51
56
57#if defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
58
59namespace bsoncxx {
60namespace builder {
61namespace basic {
62
64template <typename T, typename U>
65std::tuple<T&&, U&&> kvp(T&& t, U&& u);
66
67} // namespace basic
68} // namespace builder
69} // namespace bsoncxx
70
71#endif // defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
The bsoncxx macro guard postlude header.
The bsoncxx macro guard prelude header.
std::tuple< T &&, U && > kvp(T &&t, U &&u)
bsoncxx::v_noabi::builder::basic::kvp
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
The top-level namespace within which all bsoncxx library entities are declared.