On Fri, 19 Sept 2025 at 11:56, Jonathan Wakely <[email protected]> wrote:
>
> On Thu, 18 Sep 2025 at 18:52 -0700, Ben Wu wrote:
> >Bootstrapped and tested with check-target-libstdc++-v3 on
> >x86_64-pc-linux-gnu.
> >
> >Could someone help review and commit?
> >
> >For applying, please use the attached patch file since my email client has
> >not preserved
> >the tabs.
> >
> >Thanks,
> >-Ben
> >
> >-- 8< --
> >
> >In order to emplace a value in the middle of a deque, a temporary was
> >previously constructed directly with __args... in _M_emplace_aux.
> >This would not work since std::deque is allocator-aware and should
> >construct elements with _Alloc_traits::construct instead before the
> >element is moved.
> >
> >Using the suggestion in PR118087, we can define _Temporary_value
> >similar to the one used in std::vector, so the temporary can be
> >constructed with uses-allocator construction.
> >
> >PR libstdc++/118087
> >
> >libstdc++-v3/ChangeLog:
> >
> >* include/bits/deque.tcc: Use _Temporary_value in
> >_M_emplace_aux.
> >* include/bits/stl_deque.h: Introduce _Temporary_value.
> >* testsuite/23_containers/deque/modifiers/emplace/118087.cc:
> >New test.
> >


In order to apply the patch we need to satisfy a legal prerequisite:
https://gcc.gnu.org/contribute.html#legal
If you don't have a copyright assignment for GCC on file with the FSF,
you can contribute the patch under the DCO terms:
https://gcc.gnu.org/dco.html
If you want to use the DCO could you please read the link above
carefully and if it applies to your contribution then amend the patch
or just reply to this email with the sign-off line.

Reply via email to