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/versioning.hpp"
14 
15 #if !defined(MSGPACK_USE_CPP03)
16 # if defined(_MSC_VER)
17 # if _MSC_VER < 1900
18 # define MSGPACK_USE_CPP03
19 # endif
20 # elif (__cplusplus < 201103L)
21 # define MSGPACK_USE_CPP03
22 # endif
23 #endif // MSGPACK_USE_CPP03
24 
25 
26 #if defined(MSGPACK_USE_CPP03)
27 
28 #if defined(nullptr)
29 # if defined (__cplusplus_cli)
30 # define MSGPACK_NULLPTR __nullptr
31 # else // defined (__cplusplus_cli)
32 # define MSGPACK_NULLPTR nullptr
33 # endif // defined (__cplusplus_cli)
34 #else // defined(nullptr)
35 # define MSGPACK_NULLPTR (0)
36 #endif // defined(nullptr)
37 
38 #include <memory>
39 
40 namespace msgpack {
41 
45 
46 template <typename T>
47 struct unique_ptr;
48 
49 template <typename T>
50 T& move(T& t);
51 
52 template <typename T>
53 T const& move(T const& t);
54 
55 template <bool P, typename T = void>
56 struct enable_if;
57 
58 template<typename T, T val>
60 
63 
64 template<class T, class U>
65 struct is_same;
66 
67 template<typename T>
69 
70 template<class T>
71 struct is_array;
72 
73 template<class T>
74 struct remove_const;
75 template<class T>
77 template<class T>
78 struct remove_cv;
79 
80 template<class T>
81 struct is_pointer;
82 
84 } // MSGPACK_API_VERSION_NAMESPACE(v1)
86 
87 } // namespace msgpack
88 
89 
90 #else // MSGPACK_USE_CPP03
91 
92 #if defined (__cplusplus_cli)
93 # define MSGPACK_NULLPTR __nullptr
94 #else // defined (__cplusplus_cli)
95 # define MSGPACK_NULLPTR nullptr
96 #endif // defined (__cplusplus_cli)
97 
98 #include <memory>
99 #include <tuple>
100 
101 namespace msgpack {
105 
106  // unique_ptr
107  using std::unique_ptr;
108  // using std::make_unique; // since C++14
109  using std::hash;
110 
111  // utility
112  using std::move;
113  using std::swap;
114  using std::enable_if;
115  using std::is_same;
116  using std::underlying_type;
117  using std::is_array;
118  using std::remove_const;
119  using std::remove_volatile;
120  using std::remove_cv;
121  using std::is_pointer;
122 
124 } // MSGPACK_API_VERSION_NAMESPACE(v1)
126 } // namespace msgpack
127 
128 
129 #endif // MSGPACK_USE_CPP03
130 
131 #endif // MSGPACK_V1_CPP_CONFIG_DECL_HPP
Definition: cpp_config_decl.hpp:71
Definition: cpp_config_decl.hpp:74
Definition: cpp_config_decl.hpp:68
integral_constant< bool, true > true_type
Definition: cpp_config_decl.hpp:59
Definition: cpp_config_decl.hpp:65
Definition: adaptor_base.hpp:15
Definition: cpp_config_decl.hpp:78
T const & move(T const &t)
Definition: cpp_config_decl.hpp:47
Definition: cpp_config_decl.hpp:59
Definition: cpp_config_decl.hpp:81
Definition: cpp_config_decl.hpp:56
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:58
integral_constant< bool, false > false_type
Definition: cpp_config_decl.hpp:62
Definition: cpp_config_decl.hpp:76
T & move(T &t)