406f58e1e3
Add [[nodiscard]] to functions that are effectively just a static_cast, as per P2351. Also add it to std::addressof. libstdc++-v3/ChangeLog: * include/bits/move.h (forward, move, move_if_noexcept) (addressof): Add _GLIBCXX_NODISCARD. * include/bits/ranges_cmp.h (identity::operator()): Add nodiscard attribute. * include/c_global/cstddef (to_integer): Likewise. * include/std/bit (bit_cast): Likewise. * include/std/utility (as_const, to_underlying): Likewise.