cppweeklynews icon indicating copy to clipboard operation
cppweeklynews copied to clipboard

c++中文周刊

Results 12 cppweeklynews issues
Sort by recently updated
recently updated
newest added

https://anarthal.github.io/cppblog/modules

How useful is the hint passed to the std::unordered_… collections? https://devblogs.microsoft.com/oldnewthing/20241028-00/?p=110428 emplace_hit 在有序map有很大作用,但是在无序容器,由于不允许重复,hint基本没啥用 但无序容器存在允许重复值的 multixx,这种场景可以用,一般来说用不着 总结了一个表格 | 实现 |unordered_multixx |unordered_xx| |--| -------------------------------- | ---------------------- | |是否允许重复| 是 | 否 |...

https://coredumped.dev/2024/09/09/what-is-the-best-pointer-tagging-method/ 改写成c++ https://news.ycombinator.com/item?id=41488377 https://www.reddit.com/r/ProgrammingLanguages/comments/1fcpl3b/what_is_the_best_pointer_tagging_method/ https://www.reddit.com/r/cpp/comments/1fv10dw/what_is_the_best_pointer_tagging_method/ https://lobste.rs/s/zbx4cu _Originally posted by @wanghenshui in https://github.com/wanghenshui/cppweeklynews/issues/139#issuecomment-2437296209_

https://pigweed.dev/docs/blog/04-fixed-point.html _Originally posted by @wanghenshui in https://github.com/wanghenshui/cppweeklynews/issues/139#issuecomment-2437299632_

https://pvs-studio.com/en/blog/posts/cpp/1174/ 他这个系列不错 _Originally posted by @wanghenshui in https://github.com/wanghenshui/cppweeklynews/issues/139#issuecomment-2434754005_

各种exit https://learn.microsoft.com/en-us/previous-versions/6wdz5232(v=vs.140) https://stackoverflow.com/questions/9758495/what-is-the-difference-between-stdquick-exit-and-stdabort-and-why-was-stdq 工厂模式的几种做法 - static map - 可以利用类来封装,利用宏生成多个static变量构造,来注册到map - singleton模版注册也可以,利用模版实例化来调用注册到map 这两种都适合分散写法 - 直接注册也可以,比如 ```c++ static std::unordered_map lru_cache_options_type_info = { {"capacity", {offsetof(struct LRUCacheOptions, capacity), OptionType::kSizeT, OptionVerificationType::kNormal, OptionTypeFlags::kMutable}}, {"num_shard_bits", {offsetof(struct LRUCacheOptions,...

https://devblogs.microsoft.com/oldnewthing/20210421-00/?p=105135 https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0981r0.html

https://flatt.tech/research/posts/batbadbut-you-cant-securely-execute-commands-on-windows/ https://research.swtch.com/hwmm