Skip to content

Commit

Permalink
Fix #1943 - No auto in slice operator() return type
Browse files Browse the repository at this point in the history
  • Loading branch information
jfalcou authored Sep 28, 2024
1 parent 5b93623 commit d0aed9c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions include/eve/detail/function/slice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,19 @@ namespace eve
template<typename Options>
struct slice_callable_t : callable<slice_callable_t, Options>
{
template<typename W> struct result
{
using type = typename W::template rescale<typename W::cardinal_type::split_type>;
};

template<typename W>
EVE_FORCEINLINE constexpr auto operator()(W v) const noexcept
EVE_FORCEINLINE constexpr std::array<typename result<W>::type,2> operator()(W v) const noexcept
{
return EVE_DISPATCH_CALL(v);
}

template<typename W, std::size_t Slice>
EVE_FORCEINLINE constexpr auto operator()(W v, slice_t<Slice> s) const noexcept
EVE_FORCEINLINE constexpr typename result<W>::type operator()(W v, slice_t<Slice> s) const noexcept
{
return EVE_DISPATCH_CALL(v, s);
}
Expand Down

0 comments on commit d0aed9c

Please sign in to comment.