mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 13:15:12 +00:00
Fix pybind11 interoperability with Clang trunk (#1269)
This commit is contained in:
parent
add56ccdca
commit
ff6bd092d4
@ -1685,6 +1685,9 @@ template <> inline void cast_safe<void>(object &&) {}
|
|||||||
|
|
||||||
NAMESPACE_END(detail)
|
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,
|
template <return_value_policy policy = return_value_policy::automatic_reference,
|
||||||
typename... Args> tuple make_tuple(Args&&... args_) {
|
typename... Args> tuple make_tuple(Args&&... args_) {
|
||||||
constexpr size_t size = sizeof...(Args);
|
constexpr size_t size = sizeof...(Args);
|
||||||
|
@ -30,7 +30,8 @@
|
|||||||
# define PYBIND11_HAS_OPTIONAL 1
|
# define PYBIND11_HAS_OPTIONAL 1
|
||||||
# endif
|
# endif
|
||||||
// std::experimental::optional (but not allowed in c++11 mode)
|
// 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>
|
# include <experimental/optional>
|
||||||
# define PYBIND11_HAS_EXP_OPTIONAL 1
|
# define PYBIND11_HAS_EXP_OPTIONAL 1
|
||||||
# endif
|
# endif
|
||||||
|
Loading…
Reference in New Issue
Block a user