]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Add [[nodiscard]] to <compare>
authorJonathan Wakely <jwakely@redhat.com>
Thu, 5 Aug 2021 13:01:31 +0000 (14:01 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 5 Aug 2021 14:16:58 +0000 (15:16 +0100)
commit8dec72aeb54e98643c0fb3d53768cdb96cf1342a
tree1c12b23e80f0c1b273518eb4d60ce6e5ec3e1f87
parent03d47da7e1e91adddbde261ffefd2760df59a564
libstdc++: Add [[nodiscard]] to <compare>

This adds the [[nodiscard]] attribute to all conversion operators,
comparison operators, call operators and non-member functions in
<compare>. Nothing in this header except constructors has side effects.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* libsupc++/compare (partial_ordering, weak_ordering)
(strong_ordering, is_eq, is_neq, is_lt, is_lteq, is_gt, is_gteq)
(compare_three_way, strong_order, weak_order, partial_order)
(compare_strong_order_fallback, compare_weak_order_fallback)
(compare_partial_order_fallback, __detail::__synth3way): Add
nodiscard attribute.
* testsuite/18_support/comparisons/categories/zero_neg.cc: Add
-Wno-unused-result to options.
libstdc++-v3/libsupc++/compare
libstdc++-v3/testsuite/18_support/comparisons/categories/zero_neg.cc
This page took 0.059839 seconds and 6 git commands to generate.