diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-04-06 14:41:29 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-04-06 16:43:25 +0100 |
commit | 406f58e1e38e92e4b881f3666b596843da308783 (patch) | |
tree | 51ed49f19e399a73512f6b843bebe0388b0503a1 /gcc | |
parent | 41019bfae2673a818a9b7d08742f3ef91c0deade (diff) | |
download | gcc-406f58e1e38e92e4b881f3666b596843da308783.zip gcc-406f58e1e38e92e4b881f3666b596843da308783.tar.gz gcc-406f58e1e38e92e4b881f3666b596843da308783.tar.bz2 |
libstdc++: Add nodiscard attribute to cast-like functions
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.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions