diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index 1010ae3e8..a722a9e81 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -1686,6 +1686,9 @@ template <> inline void cast_safe(object &&) {} NAMESPACE_END(detail) +template +tuple make_tuple() { return tuple(0); } + template tuple make_tuple(Args&&... args_) { constexpr size_t size = sizeof...(Args); diff --git a/include/pybind11/stl.h b/include/pybind11/stl.h index db900e674..90eb7ea2e 100644 --- a/include/pybind11/stl.h +++ b/include/pybind11/stl.h @@ -30,7 +30,8 @@ # define PYBIND11_HAS_OPTIONAL 1 # endif // std::experimental::optional (but not allowed in c++11 mode) -# if defined(PYBIND11_CPP14) && __has_include() +# if defined(PYBIND11_CPP14) && (__has_include() && \ + !__has_include()) # include # define PYBIND11_HAS_EXP_OPTIONAL 1 # endif