Skip to content

Commit 037ffdf

Browse files
authored
Minor to_array cleanups
`#include <array>` 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.
1 parent 1aa7099 commit 037ffdf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/xtensor/xindex_view.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <tuple>
1616
#include <type_traits>
1717
#include <utility>
18+
#include <array>
1819

1920
#include "xexpression.hpp"
2021
#include "xiterable.hpp"
@@ -791,7 +792,7 @@ namespace xt
791792
inline auto index_view(E&& e, const xindex (&indices)[L]) noexcept
792793
{
793794
using view_type = xindex_view<xclosure_t<E>, std::array<xindex, L>>;
794-
return view_type(std::forward<E>(e), to_array(indices));
795+
return view_type(std::forward<E>(e), xt::to_array(indices));
795796
}
796797

797798
/**

0 commit comments

Comments
 (0)