Fix pybind11 interoperability with Clang trunk (#1269)
diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h
index 0aa6326..3ec6f72 100644
--- a/include/pybind11/cast.h
+++ b/include/pybind11/cast.h
@@ -1685,6 +1685,9 @@
NAMESPACE_END(detail)
+template <return_value_policy policy = return_value_policy::automatic_reference>
+tuple make_tuple() { return tuple(0); }
+
template <return_value_policy policy = return_value_policy::automatic_reference,
typename... Args> tuple make_tuple(Args&&... args_) {
constexpr size_t size = sizeof...(Args);
diff --git a/include/pybind11/stl.h b/include/pybind11/stl.h
index e690e43..eb4c812 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(<experimental/optional>)
+# if defined(PYBIND11_CPP14) && (__has_include(<experimental/optional>) && \
+ !__has_include(<optional>))
# include <experimental/optional>
# define PYBIND11_HAS_EXP_OPTIONAL 1
# endif