From d453c620e044f357d7c4c0e1767afab409de0e2e Mon Sep 17 00:00:00 2001 From: Christoph Pohl <christoph.pohl@kit.edu> Date: Thu, 17 Feb 2022 16:45:41 +0100 Subject: [PATCH] Fix capture of structure binding This adheres now to Core issue 23 see: https://stackoverflow.com/questions/46114214/lambda-implicit-capture-fails-with-variable-declared-from-structured-binding or https://stackoverflow.com/questions/50799719/reference-to-local-binding-declared-in-enclosing-function?noredirect=1&lq=1 --- .../ConfigIntrospection/MakeGuiConfig/MakeGuiConfigStruct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ArmarXGui/libraries/RemoteGui/ConfigIntrospection/MakeGuiConfig/MakeGuiConfigStruct.h b/source/ArmarXGui/libraries/RemoteGui/ConfigIntrospection/MakeGuiConfig/MakeGuiConfigStruct.h index a0a4a1c9..d4d211de 100644 --- a/source/ArmarXGui/libraries/RemoteGui/ConfigIntrospection/MakeGuiConfig/MakeGuiConfigStruct.h +++ b/source/ArmarXGui/libraries/RemoteGui/ConfigIntrospection/MakeGuiConfig/MakeGuiConfigStruct.h @@ -107,7 +107,7 @@ namespace armarx::meta::cfg } }(); - hana::for_each(accessors, [&](auto & e) + hana::for_each(accessors, [&, addChildren=std::ref(addChildren)](auto & e) { ARMARX_TRACE_LITE; using elem_det = decltype(armarx::meta::cfg::to_element_detail(e)); -- GitLab