This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Relocation (= move+destroy)
On Thu, 25 Oct 2018, Marc Glisse wrote:
We may want to specialize / overload __relocate_object_a for some specific
types in the future, although we would more likely have __relocate_object_a
call __relocate_object (no allocator) when it receives the default allocator,
and specialize that one. And this should anyway be less common that
specializing __is_trivially_relocatable.
(no matter how long I wait to send an email, I always think of something
right after sending it)
The code is not quite ready for specializing __is_trivially_relocatable.
It would not break, but since __use_relocate is defined by looking at
the noexcept specification of __relocate_object_a, it would not even
notice the specialization for types with a throwing move constructor :-(
I'll try to improve that in a follow up patch, and provide at least one
specialization of __is_trivially_relocatable (unless allocators defeat
me).
--
Marc Glisse