Skip to content

Commit 0365d49

Browse files
committed
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>.
1 parent e27ea47 commit 0365d49

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

include/pybind11/stl.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232
// std::experimental::optional (but not allowed in c++11 mode)
3333
# if defined(PYBIND11_CPP14) && __has_include(<experimental/optional>)
3434
# include <experimental/optional>
35-
# if __cpp_lib_experimental_optional // just in case
36-
# define PYBIND11_HAS_EXP_OPTIONAL 1
37-
# endif
35+
# define PYBIND11_HAS_EXP_OPTIONAL 1
3836
# endif
3937
// std::variant
4038
# if defined(PYBIND11_CPP17) && __has_include(<variant>)

0 commit comments

Comments
 (0)