Why clang-tidy suggests to add [[nodiscard]] everywhere?

This option is apparently “modernize-use-nodiscard”, so you can deactivate that if you prefer. It should be noted that the rules this option outlines are not the rules the C++ standard committee themselves use for when to apply [[nodiscard]]. Those rules being: It should be added where: For existing API’s not using the return value always … Read more

Why is std::move not [[nodiscard]] in C++20?

The MSVC standard library team went ahead and added several thousand instances of [[nodiscard]] since VS 2017 15.6, and have reported wild success with it (both in terms of finding lots of bugs and generating no user complaints). The criteria they described were approximately: Pure observers, e.g. vector::size(), vector::empty, and even std::count_if() Things that acquire … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)