From cb88da7211ef226039156e5df6a1e8982ff837b0 Mon Sep 17 00:00:00 2001 From: greg7mdp Date: Sun, 28 May 2023 17:28:16 -0400 Subject: [PATCH] Don't capture vector by value! --- include/gtl/soa.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gtl/soa.hpp b/include/gtl/soa.hpp index 5f2b6b7..e687319 100644 --- a/include/gtl/soa.hpp +++ b/include/gtl/soa.hpp @@ -109,7 +109,7 @@ class soa auto& col = get_column(); - 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);