std::allocator_traits::propagate_on_container_swap::value
If std::allocator_traits::propagate_on_container_swap::value is true, then the allocators are exchanged using an unqualified call to non-member swap. Otherwise, they are not swapped (and if get_allocator() != other.get_allocator(), the behavior is undefined).
https://en.cppreference.com/w/cpp/container/vector/swap
• Some Informal Remarks Towards a New Theory of Trait Customization https://sdowney.org/index.php/2023/12/24/some-informal-remarks-towards-a-new-theory-of-trait-customization/
• Did you know about C++26 static reflection proposal (1/N)? https://github.com/tip-of-the-week/cpp/blob/master/tips/361.md
• Enforcing that static local variables only exist once https://www.think-cell.com/en/career/devblog/enforcing-that-static-local-variables-only-exist-once
• How to allocate address space with a custom alignment or in a custom address region https://devblogs.microsoft.com/oldnewthing/20231229-00/?p=109204)
• What does it mean when the compiler says that it can’t convert something to itself https://devblogs.microsoft.com/oldnewthing/20231227-00/?p=109195
视频
My favourite memory leak - Björn Fahller - Lightning Talks @ Meeting C++ 2023 https://www.youtube.com/watch?v=LKKmPAQFNgE&ab_channel=MeetingCpp
一段会泄漏内存的抽象代码
非常幽默
众所周知,vector是三个指针,begin end storend三部分,swap交换自己的时候,这三个指针怎么赋值?
当然,写成c就更容易懂了 (感谢群友@只看封面)
V相当于 class V { V* data;}
Implementing coroutines using C++17 - Alon Wolf - Lightning Talks @ Meeting C++ 2023 https://www.youtube.com/watch?v=VC_3eqLFcCo&ab_channel=MeetingCpp