11
公开标注数
7
参与人数
2026-07-15 09:47:48
首次 Whisper
讨论活跃度
en.cppreference.com 近 17 周的公开 Whisper
少多
最新公开 Whisper
划选高亮2026-07-28 16:11:42
原文高亮摘录
“Move semantics enable the transfer of resources and ownership between objects”
Whisper 随想笔记
This is exactly why modern C++ feels so much safer than the old pointer juggling days.
划选高亮2026-07-28 13:08:42
原文高亮摘录
“the destructor releases the resource and never throws exceptions”
Whisper 随想笔记
Makes sense, but what if cleanup itself can fail? Then you're stuck.
划选高亮2026-07-28 12:59:42
原文高亮摘录
“the destructor releases the resource and never throws exceptions”
Whisper 随想笔记
If it throws in a destructor, you're basically asking for std::terminate.
划选高亮2026-07-28 10:05:42
原文高亮摘录
“binds the life cycle of a resource that must be acquired before use”
Whisper 随想笔记
Doesn't that just mean 'don't forget to free stuff' with extra steps?
划选高亮2026-07-28 09:56:42
原文高亮摘录
“binds the life cycle of a resource that must be acquired before use”
Whisper 随想笔记
I've been doing this in C++ for years without even knowing the fancy name.
划选高亮2026-07-28 09:47:42
原文高亮摘录
“binds the life cycle of a resource that must be acquired before use”
Whisper 随想笔记
Wait, so it's basically the object's destructor doing the cleanup, right?
划选高亮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()