File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 4242#include " adaptor/cpp11/unordered_map.hpp"
4343#include " adaptor/cpp11/unordered_set.hpp"
4444
45- #if __cplusplus >= 201703
46-
45+ #if MSGPACK_HAS_INCLUDE(<optional>)
4746#include " adaptor/cpp17/optional.hpp"
48- #include " adaptor/cpp17/string_view.hpp "
47+ #endif // MSGPACK_HAS_INCLUDE(<optional>)
4948
50- #endif // __cplusplus >= 201703
49+ #if MSGPACK_HAS_INCLUDE(<string_view>)
50+ #include " adaptor/cpp17/string_view.hpp"
51+ #endif // MSGPACK_HAS_INCLUDE(<string_view>)
5152
5253#endif // defined(MSGPACK_USE_CPP03)
5354
Original file line number Diff line number Diff line change @@ -128,4 +128,10 @@ MSGPACK_API_VERSION_NAMESPACE(v1) {
128128
129129#endif // MSGPACK_USE_CPP03
130130
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+
131137#endif // MSGPACK_V1_CPP_CONFIG_DECL_HPP
You can’t perform that action at this time.
0 commit comments