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
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
30namespace msgpack {
31
35
36template <typename T>
37struct unique_ptr;
38
39template <typename T>
40T& move(T& t);
41
42template <typename T>
43T const& move(T const& t);
44
45template <bool P, typename T = void>
46struct enable_if;
47
48template<typename T, T val>
49struct integral_constant;
50
51typedef integral_constant<bool, true> true_type;
52typedef integral_constant<bool, false> false_type;
53
54template<class T, class U>
55struct is_same;
56
57template<typename T>
58struct underlying_type;
59
60template<class T>
61struct is_array;
62
63template<class T>
64struct remove_const;
65template<class T>
66struct remove_volatile;
67template<class T>
68struct remove_cv;
69
70template<class T>
71struct 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
91namespace 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