diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-08-26 19:32:30 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-08-26 19:32:30 +0100 |
commit | 5494edae83ad33c769bd1ebc98f0c492453a6417 (patch) | |
tree | 7eea5a73704c5afb870a066d9a5852b3b6b869cd /libgo | |
parent | 0c5df67ffcf421b8c532513a655a37839e632710 (diff) | |
download | gcc-5494edae83ad33c769bd1ebc98f0c492453a6417.zip gcc-5494edae83ad33c769bd1ebc98f0c492453a6417.tar.gz gcc-5494edae83ad33c769bd1ebc98f0c492453a6417.tar.bz2 |
libstdc++: Use correct argument type for __use_alloc [PR 96803]
The _Tuple_impl constructor for allocator-extended construction from a
different tuple type uses the _Tuple_impl's own _Head type in the
__use_alloc test. That is incorrect, because the argument tuple could
have a different type. Using the wrong type might select the
leading-allocator convention when it should use the trailing-allocator
convention, or vice versa.
libstdc++-v3/ChangeLog:
PR libstdc++/96803
* include/std/tuple
(_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
Replace parameter pack with a type parameter and a pack and pass
the first type to __use_alloc.
* testsuite/20_util/tuple/cons/96803.cc: New test.
Diffstat (limited to 'libgo')
0 files changed, 0 insertions, 0 deletions