diff --git a/include/xtensor-python/pytensor.hpp b/include/xtensor-python/pytensor.hpp index 3eac157..e3746cc 100644 --- a/include/xtensor-python/pytensor.hpp +++ b/include/xtensor-python/pytensor.hpp @@ -214,7 +214,7 @@ namespace xt static self_type ensure(pybind11::handle h); static bool check_(pybind11::handle h); -#if PYBIND11_VERSION_MAJOR == 2 && PYBIND11_VERSION_MINOR >= 3 +#if (PYBIND11_VERSION_MAJOR == 2 && PYBIND11_VERSION_MINOR >= 3) || (PYBIND11_VERSION_MAJOR >= 3) // Prevent ambiguous overload resolution for operators defined for // both xt::xcontainer_semantic and pybind11::object. using semantic_base::operator+=;