Added include file checking.
This commit is contained in:
Takatoshi Kondo 2018-05-10 19:02:24 +09:00
parent bd18a36dae
commit 96133c8dd9
2 changed files with 11 additions and 4 deletions

View File

@ -42,12 +42,13 @@
#include "adaptor/cpp11/unordered_map.hpp"
#include "adaptor/cpp11/unordered_set.hpp"
#if __cplusplus >= 201703
#if MSGPACK_HAS_INCLUDE(<optional>)
#include "adaptor/cpp17/optional.hpp"
#include "adaptor/cpp17/string_view.hpp"
#endif // MSGPACK_HAS_INCLUDE(<optional>)
#endif // __cplusplus >= 201703
#if MSGPACK_HAS_INCLUDE(<string_view>)
#include "adaptor/cpp17/string_view.hpp"
#endif // MSGPACK_HAS_INCLUDE(<string_view>)
#endif // defined(MSGPACK_USE_CPP03)

View File

@ -128,4 +128,10 @@ MSGPACK_API_VERSION_NAMESPACE(v1) {
#endif // MSGPACK_USE_CPP03
#if defined(__has_include)
#define MSGPACK_HAS_INCLUDE __has_include
#else // defined(__has_include)
#define MSGPACK_HAS_INCLUDE(header) 0
#endif // defined(__has_include)
#endif // MSGPACK_V1_CPP_CONFIG_DECL_HPP