Skip to content

Commit

Permalink
Fix counter(T)
Browse files Browse the repository at this point in the history
  • Loading branch information
dancazarin committed Jan 27, 2024
1 parent 654b6e0 commit 2580fd1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/kfr/base/basic_expressions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ struct expression_traits<expression_counter<T, Dims>> : expression_traits_defaul
constexpr static shape<dims> get_shape() { return shape<dims>(infinite_size); }
};

template <typename T = int, typename Arg = T, typename... Args,
typename Tout = std::common_type_t<T, Arg, Args...>>
template <typename T = int, typename Tout = T>
KFR_INTRINSIC expression_counter<Tout, 1> counter(T start = 0)
{
return { static_cast<Tout>(std::move(start)), { static_cast<Tout>(1) } };
Expand Down

0 comments on commit 2580fd1

Please sign in to comment.