New C++
43 subscribers
37 photos
178 links
学点新的玩意 | 讨论群可以加
Download Telegram
P3324R0: Attributes for namespace aliases, template parameters, and lambda captures
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3324r0.html
想到找这个主要是因为每次写

namespace ranges = std::ranges;
namespace views = std::views;

都会被 clang-tidy 弹警告,说我未使用(实际上是在别的地方使用)。查了下并不能加属性,不然就加个 [[maybe_unused]] 了。.clang-tidy 加个 -misc-unused-alias-decls 解决
?????
讨厌 clang-format 的理由又多了一个
New C++
讨厌 clang-format 的理由又多了一个
哦只要加一个尾随逗号就会往下面推了
神秘
使用 string_view 时要小心悬垂(
原因是 std::string 有 sso,从而移动的时候会导致 std::string_view 失效,从而不能用 std::vector 而应该用 std::deque
boost 甚至有 continuation 吗,boost 还是太超模了()
好像没有人用 C++ 的协程做代数效应库,目前看到的几个实现都不是协程()
果然,又该到我出手了()
👍3
#fake 错误这么明显的垃圾答案竟然是最高赞
https://www.zhihu.com/question/476037385/answer/2279144960
Rust had been deprecated
😁7
写了 100 行模板元竟然一次过编译😋
严厉批评 std::as_(writable_)bytes 函数的设计,既然 C++ 默认可变,你就要服从,现在搞得我还得多弄个判断
6.29 nlohmann-json 也模块化了