On Wed, 18 Dec 2024 at 00:40, Jonathan Wakely <jwak...@redhat.com> wrote: > > 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. > --- > > Tested x86_64-linux.
Pushed to trunk now.