Skip to content

Commit

Permalink
Const cast value before sending it to projection function in IC_FV
Browse files Browse the repository at this point in the history
  • Loading branch information
renatoGarcia committed Mar 4, 2025
1 parent d19bea1 commit 222d40a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion icecream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5573,7 +5573,8 @@ namespace detail {
this->start <= idx && idx < this->stop
&& ((idx - this->start) % this->step) == 0
) {
dispatcher.ret(this->proj(element));
using TConst = typename std::add_const<remove_ref_t<T>>::type;
dispatcher.ret(this->proj(const_cast<TConst&>(element)));
}

return std::forward<T>(element);
Expand Down

0 comments on commit 222d40a

Please sign in to comment.