aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2018-10-31 12:29:02 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2018-10-31 12:29:02 +0000
commit0db78d0a5e95572841a98754dca6c3513a3a334d (patch)
tree4f471c309277f6fc04dbe8187e6a65c5c91687f5 /gcc/cp
parentef976be1a23a5171082cf1a569d00573013a175c (diff)
downloadgcc-0db78d0a5e95572841a98754dca6c3513a3a334d.zip
gcc-0db78d0a5e95572841a98754dca6c3513a3a334d.tar.gz
gcc-0db78d0a5e95572841a98754dca6c3513a3a334d.tar.bz2
PR libstdc++/87822 fix layout change for nested std::pair
The introduction of the empty __pair_base base class for PR 86751 changed the layout of std::pair<std::pair<...>, ...>. The outer pair and its first member both have a base class of the same type, which cannot exist at the same address. This causes the first member to be at a non-zero offset. The solution is to make the base class depend on the template parameters, so that each pair type has a different base class type, which allows the base classes of the outer pair and its first member to have the same address. PR libstdc++/87822 * include/bits/stl_pair.h (__pair_base): Change to class template. (pair): Make base class type depend on template parameters. * testsuite/20_util/pair/87822.cc: New test. From-SVN: r265678
Diffstat (limited to 'gcc/cp')
0 files changed, 0 insertions, 0 deletions