diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-12-17 17:38:43 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2025-01-08 12:45:37 +0000 |
commit | 5f44b1776e748a7528020557036740905a11b1df (patch) | |
tree | 2ccf8809cde8b9cf5ed4b0a50bf596d17344d6fa /gcc | |
parent | 4a4e5394b3001b1b3fb35c274d184ffba30156e8 (diff) | |
download | gcc-5f44b1776e748a7528020557036740905a11b1df.zip gcc-5f44b1776e748a7528020557036740905a11b1df.tar.gz gcc-5f44b1776e748a7528020557036740905a11b1df.tar.bz2 |
libstdc++: Fix std::deque::emplace calling wrong _M_insert_aux [PR90389]
We have several overloads of std::deque::_M_insert_aux, one of which is
variadic and called by std::deque::emplace. With a suitable set of
arguments to emplace, it's possible for one of the non-variadic
_M_insert_aux overloads to be selected by overload resolution, making
emplace ill-formed.
Rename the variadic _M_insert_aux to _M_emplace_aux so that calls to
emplace never select an _M_insert_aux overload. Also add an inline
_M_insert_aux for the const lvalue overload that is called from
insert(const_iterator, const value_type&).
libstdc++-v3/ChangeLog:
PR libstdc++/90389
* include/bits/deque.tcc (_M_insert_aux): Rename variadic
overload to _M_emplace_aux.
* include/bits/stl_deque.h (_M_insert_aux): Define inline.
(_M_emplace_aux): Declare.
* testsuite/23_containers/deque/modifiers/emplace/90389.cc: New
test.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions