Skip to content

Commit

Permalink
no lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
DerThorsten committed Nov 15, 2024
1 parent ec878c8 commit f6216cb
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions include/sparrow/builder/builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,17 @@ struct builder<T>
}
};



struct get_size_save_functor
{
template<class T>
auto operator()(const T& t) const
{
return get_size_save(t);
}
};

template< translate_to_variable_sized_binary_layout T>
struct builder<T>
{
Expand All @@ -171,9 +182,8 @@ struct builder<T>
auto flat_list_view = std::ranges::views::join(ensure_value_range(t));
u8_buffer<char> data_buffer(flat_list_view);

auto sizes = t | std::views::transform([](const auto& l){
return get_size_save(l);
});
auto not_lambda = get_size_save_functor();
auto sizes = t | std::views::transform(not_lambda);

return type(
std::move(data_buffer),
Expand Down

0 comments on commit f6216cb

Please sign in to comment.