diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-08-24 00:10:59 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-08-24 12:27:51 +0100 |
commit | f0f04e1dffea609cb74ac0b488385401ed7e15a3 (patch) | |
tree | c0b52c14c2878b85dc0946baf03645d2bd3cdb99 /gcc | |
parent | 4a907b15b551becd3145061a8906089267db5a04 (diff) | |
download | gcc-f0f04e1dffea609cb74ac0b488385401ed7e15a3.zip gcc-f0f04e1dffea609cb74ac0b488385401ed7e15a3.tar.gz gcc-f0f04e1dffea609cb74ac0b488385401ed7e15a3.tar.bz2 |
libstdc++: Add check for LWG 3741 problem case
This LWG issue was closed as NAD, as it was just a bug in an
implementation, not a defect in the standard. Libstdc++ never had that
bug and always worked for the problem case. Add a test to ensure we
don't regress.
The problem occurs when abs is implemented using a ternary expression:
return d >= d.zero() ? d : -d;
If decltype(-d) is not the same as decltype(d) then this is ambiguous,
because each type can be converted to the other, so there is no common
type.
libstdc++-v3/ChangeLog:
* testsuite/20_util/duration_cast/rounding.cc: Check abs with
non-reduced duration.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions