]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Make __cmp_cat::__unseq constructor consteval
authorJonathan Wakely <jwakely@redhat.com>
Thu, 17 Aug 2023 17:27:15 +0000 (18:27 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 17 Aug 2023 19:24:17 +0000 (20:24 +0100)
commit84cff28fd282c74399e6ad80df77025a5008e851
tree2f928793dc7580ec269d57834b89d1ab7b136609
parentc992acdc6774ef3d566fab5f324d254bed1b9d4b
libstdc++: Make __cmp_cat::__unseq constructor consteval

This constructor should only ever be used with a literal 0 as the
argument, so we can make it consteval. This has the nice advantage that
it is expanded immediately in the front end, and so GDB will never step
into the __cmp_cat::__unseq::__unseq(__unseq*) constructor that is
uninteresting and probably confusing to users.

libstdc++-v3/ChangeLog:

* libsupc++/compare (__cmp_cat::__unseq): Make ctor consteval.
* testsuite/18_support/comparisons/categories/zero_neg.cc: Prune
excess errors caused by invalid consteval calls.
libstdc++-v3/libsupc++/compare
libstdc++-v3/testsuite/18_support/comparisons/categories/zero_neg.cc