Skip to content

Commit

Permalink
Fix: Compilation on GCC11
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvardanian committed Jan 18, 2024
1 parent 63b66ae commit 44bc2b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/bench_similarity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ tracked_binary_functions_t distance_functions() {
alloc.free = &free_from_vector;
alloc.handle = &temporary_memory;

auto wrap_sz_distance = [alloc](auto function) -> binary_function_t {
auto wrap_sz_distance = [alloc](auto function) mutable -> binary_function_t {
return binary_function_t([function, alloc](std::string_view a_str, std::string_view b_str) mutable {
sz_string_view_t a = to_c(a_str);
sz_string_view_t b = to_c(b_str);
return function(a.start, a.length, b.start, b.length, 0, &alloc);
});
};
auto wrap_sz_scoring = [alloc](auto function) -> binary_function_t {
auto wrap_sz_scoring = [alloc](auto function) mutable -> binary_function_t {
return binary_function_t([function, alloc](std::string_view a_str, std::string_view b_str) mutable {
sz_string_view_t a = to_c(a_str);
sz_string_view_t b = to_c(b_str);
Expand Down

0 comments on commit 44bc2b8

Please sign in to comment.