mirror of
https://github.com/tristanpenman/valijson.git
synced 2025-01-19 00:46:03 +01:00
Minor change to internal/optional.hp so that __has_include is used only if __cplusplus >= 201703
This commit is contained in:
parent
a81780e8c7
commit
c2f22fddf5
@ -2,10 +2,14 @@
|
||||
#ifndef __VALIJSON_OPTIONAL_HPP
|
||||
#define __VALIJSON_OPTIONAL_HPP
|
||||
|
||||
// This should be removed once C++17 is widely available
|
||||
#if __has_include(<optional>) && __cplusplus >= 201703
|
||||
# include <optional>
|
||||
#if __cplusplus >= 201703
|
||||
// Visual C++ only supports __has_include in versions 14.12 and greater
|
||||
# if !defined(_MSC_VER) || _MSC_VER >= 1912
|
||||
# if __has_include(<optional>)
|
||||
# include <optional>
|
||||
namespace opt = std;
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# include <compat/optional.hpp>
|
||||
namespace opt = std::experimental;
|
||||
|
Loading…
x
Reference in New Issue
Block a user