libstdc++: Define some std::string constructors inline
authorJonathan Wakely <jwakely@redhat.com>
Wed, 14 Oct 2020 11:10:26 +0000 (12:10 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 14 Oct 2020 11:52:47 +0000 (12:52 +0100)
commit252c9967ba785aedf3b39e2cd50237d0f32fe3bd
tree4339807dd324b6445d5a8195715e3a575784ad06
parenta1b6b013615082f0837ea34c5a65136822523be7
libstdc++: Define some std::string constructors inline

There are a lot of very simple constructors for the old string which are
not defined inline. I don't see any reason for this and it probably
makes them less likely to be optimized away. Move the definitions into
the class body.

libstdc++-v3/ChangeLog:

* include/bits/basic_string.h (basic_string(const Alloc&))
(basic_string(const basic_string&)
(basic_string(const CharT*, size_type, const Alloc&))
(basic_string(const CharT*, const Alloc&))
(basic_string(size_type, CharT, const Alloc&))
(basic_string(initializer_list<CharT>, const Alloc&))
(basic_string(InputIterator, InputIterator, const Alloc&)):
Define inline in class body.
* include/bits/basic_string.tcc (basic_string(const Alloc&))
(basic_string(const basic_string&)
(basic_string(const CharT*, size_type, const Alloc&))
(basic_string(const CharT*, const Alloc&))
(basic_string(size_type, CharT, const Alloc&))
(basic_string(initializer_list<CharT>, const Alloc&))
(basic_string(InputIterator, InputIterator, const Alloc&)):
Move definitions into class body.
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/include/bits/basic_string.tcc