diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-10-07 12:18:57 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-10-10 12:19:11 +0100 |
commit | 2bd112dee7f9786a0484d9281899a9bb0b2ae57d (patch) | |
tree | 54752d194ff6bea23e463eaea83be6a1132ecf50 /gcc | |
parent | a99f511c57b5b02edfd5969148c580b4a8737ee8 (diff) | |
download | gcc-2bd112dee7f9786a0484d9281899a9bb0b2ae57d.zip gcc-2bd112dee7f9786a0484d9281899a9bb0b2ae57d.tar.gz gcc-2bd112dee7f9786a0484d9281899a9bb0b2ae57d.tar.bz2 |
libstdc++: std::make_signed_t<cv bool> should be ill-formed
Currently we only reject std::make_signed_t<bool> but not cv bool.
Similarly for std::make_unsigned_t<cv bool>.
As well as making those ill-formed, this adds a requires-clause to the
make_signed and make_unsigned primary templates. This makes
non-integral, non-enum cases fail immediately with a clear error, rather
than giving an error about __make_signed_selector<T, false, false> being
incomplete.
libstdc++-v3/ChangeLog:
* include/std/type_traits (make_signed, make_unsigned): Add
specializations for cv bool. Add requires-clause for C++20 to
improve diagnostics for non-integral, non-enum cases.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
Check cv bool.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.
* testsuite/24_iterators/range_access/range_access_cpp20_neg.cc:
Adjust expected errors for C++20 and later.
* testsuite/lib/prune.exp: Prune "in requirements [with ...]"
lines from diagnostics.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions