颜闽辉

Results 4 issues of 颜闽辉

https://github.com/tdlib/td/blob/70bee089d492437ce931aa78446d89af3da182fc/tdutils/td/utils/Closure.h#L56-L118 It seems `ImmediateClosure` and `DelayedClosure` can merge to one class, for example (see [Insights](https://cppinsights.io/s/5d56fcb7)): ```.cpp #include #include template struct MemberPointerClass {}; template struct MemberPointerClass { using type = U;...

https://github.com/Captain1986/CaptainBlackboard/blob/39c0078394eb14ebd5ed58cab5d41717912a92b6/D%230050-C%2B%2B%E4%B8%AD%E6%B5%AE%E7%82%B9%E5%80%BC%E5%81%9A%E6%AF%94%E8%BE%83%E7%9A%84%E6%AD%A3%E7%A1%AE%E6%96%B9%E6%B3%95/code/main.cpp#L6-L9 cppinsights: ```.cpp bool isEqual(const double first, const double second, const double epsilon) { return static_cast(abs(static_cast(first - second))) < epsilon; } ``` `first-second` 转换为 `int` 已经失去精确度。 Example: https://compiler-explorer.com/z/TPrcsGbEE

https://github.com/HaoQChen/HaoQChen.github.io/blob/3d2bf73f61c1d215e9864d7ef3db3b2bbcd9d015/_posts/understand_cpp/2020-01-17-emplace_back-vs-push_back.md?plain=1#L40-L45 `emplace_back` 有调用 `explicit` 构造函数,而 `push_back` 并不会。如下示例使用 `push_back` 就会告诉你可能误用,而使用 `emplace_back` 语义就没那么清楚了,在没有见到 `v` 的声明的情况下,你可能会认为压入 `10`,实际却构造了一个含有 10 个元素的容器。 ```.cpp std::vector v; v.emplace_back(10); std::cout

1. [x] **多个日志记录器** 每个日志记录器能够加载多个日志槽,每个日志槽可以附加到多个日志记录器,相互独立。 e.g. ~~~cpp dlout(name, level)

enhancement
fixing