From 7faaece6b0d449ef405bb9c980db8c37932566a3 Mon Sep 17 00:00:00 2001 From: Ted Mostly Date: Fri, 6 Jan 2023 21:05:13 +0800 Subject: [PATCH] 95 (#30) --- README.md | 2 +- .../v2-8fd07433b3c89168ac731a8192cd27cb_r.jpg | Bin 0 -> 27081 bytes posts/095.md | 436 ++++++++++++++++++ 3 files changed, 437 insertions(+), 1 deletion(-) create mode 100644 assets/v2-8fd07433b3c89168ac731a8192cd27cb_r.jpg create mode 100644 posts/095.md diff --git a/README.md b/README.md index 847a72d..375a2f4 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ RSS使用仓库的release RSS [链接](https://github.com/wanghenshui/cppweeklyn ## 2023 -| | | | | [九十五]() | | | | | | +| | | | | [九十五](./posts/095.md) | | | | | | | --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | | | | | | | | | | | | diff --git a/assets/v2-8fd07433b3c89168ac731a8192cd27cb_r.jpg b/assets/v2-8fd07433b3c89168ac731a8192cd27cb_r.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8bb6d16755a6173257e8b7ea5a690a9fa2dbf627 GIT binary patch literal 27081 zcmeFYWmFvByC&LLNN|VXfshb15L^>9&^R>i4vo7*NC*%#1PvP88iF*|xJz&vX`l&^ zCb-i$48JpT=6}x2x$CYw>wdT&?psxFJ!?yCsVz_K{nq{b{ciw?vVxKV00RR9@c!Wd z+^=D>E6K{5X=te{D5=OlcmM#HG=K-eBmn@NUA#QB6lIw84Gfw8ar<|%u<~^Kcl=-6 zAD)4p1w3c~V4C~C@c+MadSY$kY4s53@Zs|Ect{)oz_5P66n6g|`~8D0|2vNT2Ycvf z$v%Y1d%)~={{dV62kh(R=JgO}@SpHjZXW;Or3WnG?BxAVTK~vDIVP}i0ck(n^&c*J zfG0o;pa_t8!2hqxzv|O99{>wHWt=DCpH!~4mLKrl7B&VB*&|$17JhPyXM8eRkKbupdL&V@TDXVjQ@zptQ2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y5ZA& zRwutv&A?*!2mAp-vRLjWj*sC#;`sid3I9KCNs;0c?Wj<}s?3BFVI~X8Sp^LGYY-V_ z;4cI@+M|j)i}`k`e3klF{ZaQcqupgHrXz-&GvIY0HR&Uf zer|a}1HdX}CR7*hU?_!5k2GimrR?$(z~=+V1H^Ek78E@(UtxW)(aw}TOna9T?3$@d)+rr9WjQ`_-*G3D+qhz9wnh8dZ(1qBo>etH zF=D^islVg+T}djV_A7S$!x`K822@nLQ6FtS^oA;e=X%iE4Mwi4(|pMa=+|aEN_18x zh*RyC0sz)-yUS#mJF~2~=rAQVE?qXZ|0%%z?_gleSa{^jYobhGv=?nE^`%DlCT%z| z6Coe|GQp|U+CWg-+Z9_qW!-%cao~#ezdRM9w>WG@Qvsbw`V^&)z5P>+Z}2)mZORz zW^klhdIiTFv!iuUb??3#;}b#ig25IKxLsQQl=EZS{txDC3ymw%lO`h;(AcB>QXvH( zT@)Le!2jl-0sovFP>z-u)vev6)c8sL*ynjwq+dvy22Jb0Du~Y) zNo|Nq1>58`Tw(5GHG&d!aL?ZJ`9qbzb zu4E}|`Ttqx|2pW!buy%*s-^Pxr`-!Juj`g&0|Q7%RSSaTKk~uJH~FTU{PBgJH@(Z| f4&3 + +弄了个qq频道,[手机qq点击进入](https://qun.qq.com/qqweb/qunpro/share?_wv=3&_wwv=128&inviteCode=xzjHQ&from=246610&biz=ka) + +欢迎投稿,推荐或自荐文章/软件/资源等 + +请[提交 issue](https://github.com/wanghenshui/cppweeklynews/issues) + +新年第一周 + +--- + +## 文章 + +- [编程求一个正整数有几位,最快的方法是什么?](https://www.zhihu.com/question/566834458/answer/2767218099) + +`__builtin_clzll`.作者还讲了一些优化的东西,涨涨见识 + +- [C++ at the end of 2022 ](https://www.cppstories.com/2022/cpp-status-2022/) + +总结了2022年来c++的各种进展,很全面了 + +- [Did you know that C+23 permitts static constexpr variables in constexpr functions? ](https://github.com/QuantlabFinancial/cpp_tip_of_the_week/blob/master/tips/310.md) + +直接看代码 +```cpp +constexpr auto foo() { + static constexpr auto value = 42; // error in C++20, okay in C++23 + return value; +} +``` +乍看没啥用 + +给个例子 + +```cpp +template +[[nodiscard]] constexpr auto to_string_view(){ + static constexpr char p[sizeof...(Cs)] = {Cs...}; + return std::string_view(p, sizeof...(Cs)); +} +``` + +我发现这个特性和例子差距有点像`你已经学会1+1=2了来证明黎曼猜想吧`那种感觉 + +- [Did you know DRY (Don’t Repeat Yourself) comparisons pattern?](https://github.com/QuantlabFinancial/cpp_tip_of_the_week/blob/master/tips/311.md) + +实现条件判断版本的none of any of + + +```cpp +auto none_of(auto pred, auto... ts) { + const auto a = std::array{ts...}; + return std::none_of(std::cbegin(a), std::cend(a), pred); +} + +auto before(int a, int b, int c) { + if (a != 2 and b != 2 and c != 2) { + return 42; + } + return 0; +} + +auto after(int a, int b, int c) { + if (none_of([](auto x) { return x == 2; }, a, b, c)) { + return 42; + } + return 0; +} +``` + +anyof怎么实现? + +```cpp +#include +#include +#include + +template +struct Comp { + template + auto operator==(T && other) { + return std::apply( + [&other](auto &&... data) { + return (((std::equality_comparable_with) && data == other) || ...); + }, + this -> data + ); + } + std::tuple data {}; +}; + +template +auto any_of(Args && ... args) { + return Comp { + std::make_tuple(std::forward(args)...) + }; + +} +``` + +和上面差距有点大 + +- [Adding Design-by-Contract [[invariant]] conditions to C++, via a GCC plugin](https://gavinray97.github.io/blog/adding-invariant-to-cpp-design-by-contract)\ + +实现了一个gcc插件支持`[[invariant]]`特性,代码在这里https://github.com/GavinRay97/gcc-invariant-plugin + +博客记录了开发插件的方法和过程,挺有意思的 + +- [Debugging binaries invoked from scripts with GDB](https://developers.redhat.com/articles/2022/12/27/debugging-binaries-invoked-scripts-gdb#) + +gdb调试和shell交互,复杂 + +- [Cpp2 and cppfront: Year-end mini-update](https://herbsutter.com/2022/12/31/cpp2-and-cppfront-year-end-mini-update/) + +介绍他的折腾 + +- [Parallelizing C++ using Execution Policies](https://azeemba.com/posts/cpp17-execution-policy.html) + +就是`std::execution::par`/`std::execution::par_unseq`这玩意 + +```cpp +std::vector indices(num_pixels); + // initialize indices with 0, 1, .. +std::iota(indices.begin(), indices.end(), 0); // needs + +std::transform( // needs + std::execution::par, // <-- needs + indices.begin(), indices.end(), pixels.begin(), + [](size_t index){ + return expensive_calculation(index); + } +); +``` +- [5 techniques for writing memory safe C++](https://www.embedded.com/5-techniques-for-writing-memory-safe-c/) + +老生常谈讲智能指针那套东西 + +- []() + +检查有没有std::hash特化 + +```cpp +struct HasStdHash { +private: + template {})> + static constexpr bool exists(int) { + return true; + } + + template + static constexpr bool exists(char) { + return false; + } + +public: + template + static constexpr bool check() { + return exists(42); + } +}; + +std::cout << "Does std::string have std::hash? " << HasStdHash::check(); +``` + +能不能更泛化一点? + +```cpp +template