Fixes issue where comm::async() would check for lambdas attempting to capture but other operations calling comm::async() (e.g. container::async_visit() calls) would circumvent this check through their wrapping of lambdas.
This check is now done through a macro using static_assert. A solution without a macro would be preferred, but the error message printed by static_assert is currently required to be a string literal (until C++26).
Fixes issue where
comm::async()
would check for lambdas attempting to capture but other operations callingcomm::async()
(e.g.container::async_visit()
calls) would circumvent this check through their wrapping of lambdas.This check is now done through a macro using
static_assert
. A solution without a macro would be preferred, but the error message printed bystatic_assert
is currently required to be a string literal (until C++26).