]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Make COW string use allocator_traits for nested types
authorJonathan Wakely <jwakely@redhat.com>
Thu, 30 Jul 2020 19:58:09 +0000 (20:58 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 29 Mar 2021 19:58:50 +0000 (20:58 +0100)
commit7baf1e2eb932e7a0f4857d46d9456201c5f577f2
treeadd6aaef1d298652b081b4c62bbd2815ae400690
parent14f8307cf4261efd5ee4475b3c7f7c42c48557d6
libstdc++: Make COW string use allocator_traits for nested types

When compiled as C++20 the COW std::string fails due to assuming that
the allocator always defines size_type and difference_type. That has
been incorrect since C++11, but we got away with it for specializations
using std::allocator until those members were removed in C++20.

libstdc++-v3/ChangeLog:

* include/bits/basic_string.h (size_type, difference_type):
Use allocator_traits to obtain the allocator's size_type and
difference_type.

(cherry picked from commit 684d6ee140af6585c18c8790f8f5bddfcc6bd153)
libstdc++-v3/include/bits/basic_string.h
This page took 0.056573 seconds and 6 git commands to generate.