From 45d4040b17a6fa73724e5a5b17d5f8f7bad30ad3 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 31 Jul 2025 16:47:18 +0200 Subject: [PATCH] Fix pybind11 compatibility for version 3.x Fix #323 - again --- include/xtensor-python/pyarray.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/xtensor-python/pyarray.hpp b/include/xtensor-python/pyarray.hpp index 0854fb3..c24a793 100644 --- a/include/xtensor-python/pyarray.hpp +++ b/include/xtensor-python/pyarray.hpp @@ -195,7 +195,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+=;