diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-08-02 17:12:52 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-08-03 15:06:56 +0100 |
commit | a1a2654cdc90e9aa561a0e853b4b1372892afb70 (patch) | |
tree | a4671c2d44b4b3830afff81c757dbdfae7d487da /libgcc | |
parent | 048039c49b96875144f67e7789fdea54abf7710b (diff) | |
download | gcc-a1a2654cdc90e9aa561a0e853b4b1372892afb70.zip gcc-a1a2654cdc90e9aa561a0e853b4b1372892afb70.tar.gz gcc-a1a2654cdc90e9aa561a0e853b4b1372892afb70.tar.bz2 |
libstdc++: Avoid using std::unique_ptr in <locale>
std::wstring_convert and std::wbuffer_convert types are not copyable or
movable, and store a plain pointer without a deleter. That means a much
simpler type that just uses delete in its destructor can be used instead
of std::unique_ptr.
That avoids including and parsing all of <bits/unique_ptr.h> in every
header that includes <locale>. It also avoids instantiating
unique_ptr<C> and std::tuple<C*, default_delete<C>> when the conversion
utilities are used.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* include/bits/locale_conv.h (__detail::_Scoped_ptr): Define new
RAII class template.
(wstring_convert, wbuffer_convert): Use __detail::_Scoped_ptr
instead of unique_ptr.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions