MessagePack for C++
cpp_config_decl.hpp
Go to the documentation of this file.
1 //
2 // MessagePack for C++ C++03/C++11 Adaptation
3 //
4 // Copyright (C) 2016 KONDO Takatoshi
5 //
6 // Distributed under the Boost Software License, Version 1.0.
7 // (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
9 //
10 #ifndef MSGPACK_V1_CPP_CONFIG_DECL_HPP
11 #define MSGPACK_V1_CPP_CONFIG_DECL_HPP
12 
13 #include "msgpack/cpp_version.hpp"
14 #include "msgpack/versioning.hpp"
15 
16 #if defined(MSGPACK_USE_CPP03)
17 
18 #if defined(nullptr)
19 # if defined (__cplusplus_cli)
20 # define MSGPACK_NULLPTR __nullptr
21 # else // defined (__cplusplus_cli)
22 # define MSGPACK_NULLPTR nullptr
23 # endif // defined (__cplusplus_cli)
24 #else // defined(nullptr)
25 # define MSGPACK_NULLPTR (0)
26 #endif // defined(nullptr)
27 
28 #include <memory>
29 
30 namespace msgpack {
31 
35 
36 template <typename T>
37 struct unique_ptr;
38 
39 template <typename T>
40 T& move(T& t);
41 
42 template <typename T>
43 T const& move(T const& t);
44 
45 template <bool P, typename T = void>
46 struct enable_if;
47 
48 template<typename T, T val>
49 struct integral_constant;
50 
51 typedef integral_constant<bool, true> true_type;
52 typedef integral_constant<bool, false> false_type;
53 
54 template<class T, class U>
55 struct is_same;
56 
57 template<typename T>
58 struct underlying_type;
59 
60 template<class T>
61 struct is_array;
62 
63 template<class T>
64 struct remove_const;
65 template<class T>
66 struct remove_volatile;
67 template<class T>
68 struct remove_cv;
69 
70 template<class T>
71 struct is_pointer;
72 
74 } // MSGPACK_API_VERSION_NAMESPACE(v1)
76 
77 } // namespace msgpack
78 
79 
80 #else // MSGPACK_USE_CPP03
81 
82 #if defined (__cplusplus_cli)
83 # define MSGPACK_NULLPTR __nullptr
84 #else // defined (__cplusplus_cli)
85 # define MSGPACK_NULLPTR nullptr
86 #endif // defined (__cplusplus_cli)
87 
88 #include <memory>
89 #include <tuple>
90 
91 namespace msgpack {
95 
96  // unique_ptr
97  using std::unique_ptr;
98  // using std::make_unique; // since C++14
99  using std::hash;
100 
101  // utility
102  using std::move;
103  using std::swap;
104  using std::enable_if;
105  using std::is_same;
106  using std::underlying_type;
107  using std::is_array;
108  using std::remove_const;
109  using std::remove_volatile;
110  using std::remove_cv;
111  using std::is_pointer;
112 
114 } // MSGPACK_API_VERSION_NAMESPACE(v1)
116 } // namespace msgpack
117 
118 
119 #endif // MSGPACK_USE_CPP03
120 
121 #if defined(__has_include)
122 #define MSGPACK_HAS_INCLUDE __has_include
123 #else // defined(__has_include)
124 #define MSGPACK_HAS_INCLUDE(header) 0
125 #endif // defined(__has_include)
126 
127 #endif // MSGPACK_V1_CPP_CONFIG_DECL_HPP
Definition: adaptor_base.hpp:15
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:66