Skip to content

Commit

Permalink
Fix pybind11 interoperability with Clang trunk (#1269)
Browse files Browse the repository at this point in the history
  • Loading branch information
wjakob committed Feb 6, 2018
1 parent add56cc commit ff6bd09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions include/pybind11/cast.h
Original file line number Diff line number Diff line change
Expand Up @@ -1685,6 +1685,9 @@ template <> inline void cast_safe<void>(object &&) {}

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);
Expand Down
3 changes: 2 additions & 1 deletion include/pybind11/stl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ff6bd09

Please sign in to comment.