Skip to content

Commit

Permalink
Don't capture vector by value!
Browse files Browse the repository at this point in the history
  • Loading branch information
greg7mdp committed May 28, 2023
1 parent ca4b860 commit cb88da7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/gtl/soa.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class soa

auto& col = get_column<col_idx>();

auto comp_wrapper = [=](size_t a, size_t b) { return comp(col[a], col[b]); };
auto comp_wrapper = [&](size_t a, size_t b) { return comp(col[a], col[b]); };

std::stable_sort(sort_tmp.o.begin(), sort_tmp.o.end(), comp_wrapper);

Expand Down

0 comments on commit cb88da7

Please sign in to comment.