From 037ffdf082d7d7b9cf63aa0f939c4ed0b4eb10f3 Mon Sep 17 00:00:00 2001 From: Laramie Leavitt Date: Wed, 10 Jan 2024 11:00:01 -0800 Subject: [PATCH 1/2] Minor to_array cleanups `#include ` for std::array Namespace qualify `to_array` as `xt::to_array` to avoid ambiguous overload from adl of `std::array`. Note: This could, perhaps, be `std::to_array` instead. --- include/xtensor/xindex_view.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/xtensor/xindex_view.hpp b/include/xtensor/xindex_view.hpp index 67c122e75..7c56f7a53 100644 --- a/include/xtensor/xindex_view.hpp +++ b/include/xtensor/xindex_view.hpp @@ -15,6 +15,7 @@ #include #include #include +#include #include "xexpression.hpp" #include "xiterable.hpp" @@ -791,7 +792,7 @@ namespace xt inline auto index_view(E&& e, const xindex (&indices)[L]) noexcept { using view_type = xindex_view, std::array>; - return view_type(std::forward(e), to_array(indices)); + return view_type(std::forward(e), xt::to_array(indices)); } /** From df9323949ebdcf22eeb6813440bf7612629604cf Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Tue, 16 Jan 2024 22:39:07 +0100 Subject: [PATCH 2/2] Fixed linter --- include/xtensor/xindex_view.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/xtensor/xindex_view.hpp b/include/xtensor/xindex_view.hpp index 7c56f7a53..aa619520b 100644 --- a/include/xtensor/xindex_view.hpp +++ b/include/xtensor/xindex_view.hpp @@ -11,11 +11,11 @@ #define XTENSOR_INDEX_VIEW_HPP #include +#include #include #include #include #include -#include #include "xexpression.hpp" #include "xiterable.hpp"