MessagePack for C++
Loading...
Searching...
No Matches
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
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
40namespace msgpack {
41
45
46template <typename T>
48
49template <typename T>
50T& move(T& t);
51
52template <typename T>
53T const& move(T const& t);
54
55template <bool P, typename T = void>
56struct enable_if;
57
58template<typename T, T val>
60
63
64template<class T, class U>
65struct is_same;
66
67template<typename T>
69
70template<class T>
71struct is_array;
72
73template<class T>
75template<class T>
77template<class T>
78struct remove_cv;
79
80template<class T>
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
101namespace 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#if defined(__has_include)
132#define MSGPACK_HAS_INCLUDE __has_include
133#else // defined(__has_include)
134#define MSGPACK_HAS_INCLUDE(header) 0
135#endif // defined(__has_include)
136
137#endif // MSGPACK_V1_CPP_CONFIG_DECL_HPP
Definition adaptor_base.hpp:15
T & move(T &t)
integral_constant< bool, true > true_type
Definition cpp_config_decl.hpp:61
integral_constant< bool, false > false_type
Definition cpp_config_decl.hpp:62
Definition cpp_config_decl.hpp:56
Definition cpp_config_decl.hpp:59
Definition cpp_config_decl.hpp:71
Definition cpp_config_decl.hpp:81
Definition cpp_config_decl.hpp:65
Definition cpp_config_decl.hpp:74
Definition cpp_config_decl.hpp:78
Definition cpp_config_decl.hpp:76
Definition cpp_config_decl.hpp:68
Definition cpp_config_decl.hpp:47
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition versioning.hpp:58