PR libstdc++/92267 fix ABI change in deque iterators
authorJonathan Wakely <jwakely@redhat.com>
Tue, 29 Oct 2019 17:14:55 +0000 (17:14 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 29 Oct 2019 17:14:55 +0000 (17:14 +0000)
commit0ed4d40833715b0650e9ed4d561ca9ea0dacf2b1
tree2763bec9a60a4b43faf8f43d5a42e922803b59d5
parent668ca0509c74782ace9449ccb6605a6dddeec338
PR libstdc++/92267 fix ABI change in deque iterators

Defaulting the copy constructor on its first declaration made it change
from user-provided (and non-trivial) to implicitly-defined (and
trivial). This caused an ABI incompatibility between GCC 8 and GCC 9,
where functions taking a deque iterator disagree on the argument passing
convention.

PR libstdc++/92267
* include/bits/stl_deque.h (_Deque_iterator(const _Deque_iterator&)):
Do not define as defaulted.
* testsuite/23_containers/deque/types/92267.cc: New test.

From-SVN: r277577
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_deque.h
libstdc++-v3/testsuite/23_containers/deque/types/92267.cc [new file with mode: 0644]