Lambda expressions (since C++11) - cppreference.com
5
公开标注数
5
参与人数
2026-07-15 09:47:48
首次 Whisper
本页的公开 Whisper
划选高亮2026-07-15 13:08:48
原文高亮摘录
“A non-empty comma-separated list of template parameters, used to provide names to the template parameters of a generic lambda”
Whisper 随想笔记
Wait, I thought generic lambdas used auto — this is new to me.
划选高亮2026-07-15 12:59:48
原文高亮摘录
“A non-empty comma-separated list of template parameters, used to provide names to the template parameters of a generic lambda”
Whisper 随想笔记
So this is just for naming the template params, not the actual types?
划选高亮2026-07-15 10:05:48
原文高亮摘录
“Constructs a closure (an unnamed function object capable of capturing variables in scope).”
Whisper 随想笔记
I still can't tell if that's better than just writing a normal function.
划选高亮2026-07-15 09:56:48
原文高亮摘录
“Constructs a closure (an unnamed function object capable of capturing variables in scope).”
Whisper 随想笔记
does this mean it's basically a functor but with less typing?
划选高亮2026-07-15 09:47:48
原文高亮摘录
“Constructs a closure (an unnamed function object capable of capturing variables in scope).”
Whisper 随想笔记
so basically a lambda is just a hidden struct with operator()
分享本页 Whisper
短链接
https://domwhisper.com/s/2e6810c8fb1d嵌入代码
<iframe src="https://domwhisper.com/embed/2e6810c8fb1d" width="100%" height="480" style="border:0;border-radius:16px" loading="lazy"></iframe>