Closed fsmoke closed 2 years ago
Thanks for the suggestion. No need for SFINAE here, just overload the algorithm:
template <typename ...Types, typename F>
F for_each_pixel(any_image_view<Types...> const& src, F fun)
{
return apply_operation(src, [&fun](auto && v) {
return for_each_pixel(v, fun);
});
}
I suggest solution with boost::variant2::visit, see code below(code is approximated, not tested and etc, writed right here - it's just idea) you can write specialization for for_each_pixel...i think
example of usage