Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
swap.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2// Tencent is pleased to support the open source community by making RapidJSON available.
3//
4// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
5//
6// Licensed under the MIT License (the "License"); you may not use this file except
7// in compliance with the License. You may obtain a copy of the License at
8//
9// http://opensource.org/licenses/MIT
10//
11// Unless required by applicable law or agreed to in writing, software distributed
12// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
13// CONDITIONS OF ANY KIND, either express or implied. See the License for the
14// specific language governing permissions and limitations under the License.
15
16#ifndef RAPIDJSON_INTERNAL_SWAP_H_
17#define RAPIDJSON_INTERNAL_SWAP_H_
18
19#include "../rapidjson.h"
20
21#if defined(__clang__)
22RAPIDJSON_DIAG_PUSH
23RAPIDJSON_DIAG_OFF(c++98-compat)
24#endif
25
27namespace internal {
28
30
33template <typename T>
34inline void Swap(T& a, T& b) RAPIDJSON_NOEXCEPT {
35 T tmp = a;
36 a = b;
37 b = tmp;
38}
39
40} // namespace internal
42
43#if defined(__clang__)
44RAPIDJSON_DIAG_POP
45#endif
46
47#endif // RAPIDJSON_INTERNAL_SWAP_H_
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
Definition rapidjson.h:122
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
Definition rapidjson.h:125