Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
[[nodiscard]]Clang-Tidy 抱怨缺少没有参数的常量成员函数是否有充分的理由?如果返回值被丢弃,编译器不能自己解决这个问题并发出警告吗?
[[nodiscard]]
在我看来,这对于人类读者来说是多余的信息。
我看不出有什么好的理由,它只是降低了信噪比。