fmayer wrote: Ah, my bad. You do need to capture the buffer by reference, but only that. Very sorry for the confusion. Seems like for lambda capture the decay rules are different than for arguments https://github.com/llvm/llvm-project/pull/122018