Remove feature macro for <experimental/optional>

libc++ 3.8 (and possibly others--including the derived version on OS X),
doesn't define the macro, but does support std::experimental::optional.
This removes the extra macro check and just assumes the header existing
is enough, which is what we do for <optional> and <variant>.
This commit is contained in:
Jason Rhinelander 2017-06-08 16:57:49 -03:00
parent e27ea47c87
commit 0365d491b5

View File

@ -32,9 +32,7 @@
// std::experimental::optional (but not allowed in c++11 mode)
# if defined(PYBIND11_CPP14) && __has_include(<experimental/optional>)
# include <experimental/optional>
# if __cpp_lib_experimental_optional // just in case
# define PYBIND11_HAS_EXP_OPTIONAL 1
# endif
# define PYBIND11_HAS_EXP_OPTIONAL 1
# endif
// std::variant
# if defined(PYBIND11_CPP17) && __has_include(<variant>)