LLNL / ygm

Other
31 stars 22 forks source link

Adds check for async lambdas attempting to capture #243

Closed steiltre closed 3 months ago

steiltre commented 3 months ago

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).