|
1836 | 1836 | constexpr basic_string<charT, traits, Allocator>
|
1837 | 1837 | operator+(basic_string<charT, traits, Allocator>&& lhs,
|
1838 | 1838 | charT rhs);
|
| 1839 | + template<class charT, class traits, class Allocator> |
| 1840 | + constexpr basic_string<charT, traits, Allocator> |
| 1841 | + operator+(const basic_string<charT, traits, Allocator>& lhs, |
| 1842 | + type_identity_t<basic_string_view<charT, traits>> rhs); |
| 1843 | + template<class charT, class traits, class Allocator> |
| 1844 | + constexpr basic_string<charT, traits, Allocator> |
| 1845 | + operator+(basic_string<charT, traits, Allocator>&& lhs, |
| 1846 | + type_identity_t<basic_string_view<charT, traits>> rhs); |
| 1847 | + template<class charT, class traits, class Allocator> |
| 1848 | + constexpr basic_string<charT, traits, Allocator> |
| 1849 | + operator+(type_identity_t<basic_string_view<charT, traits>> lhs, |
| 1850 | + const basic_string<charT, traits, Allocator>& rhs); |
| 1851 | + template<class charT, class traits, class Allocator> |
| 1852 | + constexpr basic_string<charT, traits, Allocator> |
| 1853 | + operator+(type_identity_t<basic_string_view<charT, traits>> lhs, |
| 1854 | + basic_string<charT, traits, Allocator>&& rhs); |
1839 | 1855 |
|
1840 | 1856 | template<class charT, class traits, class Allocator>
|
1841 | 1857 | constexpr bool
|
|
4851 | 4867 | \end{codeblock}
|
4852 | 4868 | \end{itemdescr}
|
4853 | 4869 |
|
| 4870 | +\indexlibrarymember{operator+}{basic_string}% |
| 4871 | +\begin{itemdecl} |
| 4872 | +template<class charT, class traits, class Allocator> |
| 4873 | + constexpr basic_string<charT, traits, Allocator> |
| 4874 | + operator+(const basic_string<charT, traits, Allocator>& lhs, |
| 4875 | + type_identity_t<basic_string_view<charT, traits>> rhs); |
| 4876 | +\end{itemdecl} |
| 4877 | + |
| 4878 | +\begin{itemdescr} |
| 4879 | +\pnum |
| 4880 | +Equivalent to: |
| 4881 | +\begin{codeblock} |
| 4882 | +basic_string<charT, traits, Allocator> r = lhs; |
| 4883 | +r.append(rhs); |
| 4884 | +return r; |
| 4885 | +\end{codeblock} |
| 4886 | +\end{itemdescr} |
| 4887 | + |
| 4888 | +\indexlibrarymember{operator+}{basic_string}% |
| 4889 | +\begin{itemdecl} |
| 4890 | +template<class charT, class traits, class Allocator> |
| 4891 | + constexpr basic_string<charT, traits, Allocator> |
| 4892 | + operator+(basic_string<charT, traits, Allocator>&& lhs, |
| 4893 | + type_identity_t<basic_string_view<charT, traits>> rhs); |
| 4894 | +\end{itemdecl} |
| 4895 | + |
| 4896 | +\begin{itemdescr} |
| 4897 | +\pnum |
| 4898 | +Equivalent to: |
| 4899 | +\begin{codeblock} |
| 4900 | +lhs.append(rhs); |
| 4901 | +return std::move(lhs); |
| 4902 | +\end{codeblock} |
| 4903 | +\end{itemdescr} |
| 4904 | + |
| 4905 | +\indexlibrarymember{operator+}{basic_string}% |
| 4906 | +\begin{itemdecl} |
| 4907 | +template<class charT, class traits, class Allocator> |
| 4908 | + constexpr basic_string<charT, traits, Allocator> |
| 4909 | + operator+(type_identity_t<basic_string_view<charT, traits>> lhs, |
| 4910 | + const basic_string<charT, traits, Allocator>& rhs); |
| 4911 | +\end{itemdecl} |
| 4912 | + |
| 4913 | +\begin{itemdescr} |
| 4914 | +\pnum |
| 4915 | +Equivalent to: |
| 4916 | +\begin{codeblock} |
| 4917 | +basic_string<charT, traits, Allocator> r = rhs; |
| 4918 | +r.insert(0, lhs); |
| 4919 | +return r; |
| 4920 | +\end{codeblock} |
| 4921 | +\end{itemdescr} |
| 4922 | + |
| 4923 | +\indexlibrarymember{operator+}{basic_string}% |
| 4924 | +\begin{itemdecl} |
| 4925 | +template<class charT, class traits, class Allocator> |
| 4926 | + constexpr basic_string<charT, traits, Allocator> |
| 4927 | + operator+(type_identity_t<basic_string_view<charT, traits>> lhs, |
| 4928 | + basic_string<charT, traits, Allocator>&& rhs); |
| 4929 | +\end{itemdecl} |
| 4930 | + |
| 4931 | +\begin{itemdescr} |
| 4932 | +\pnum |
| 4933 | +Equivalent to: |
| 4934 | +\begin{codeblock} |
| 4935 | +rhs.insert(0, lhs); |
| 4936 | +return std::move(rhs); |
| 4937 | +\end{codeblock} |
| 4938 | +\end{itemdescr} |
| 4939 | + |
| 4940 | +\pnum |
| 4941 | +\begin{note} |
| 4942 | +Using a specialization of \tcode{type_identity_t} as a parameter type ensures |
| 4943 | +that an object of type \tcode{basic_string<charT, traits, Allocator>} |
| 4944 | +can be concatenated with an object of a type \tcode{T} |
| 4945 | +having an implicit conversion to |
| 4946 | +\tcode{basic_string_view<charT, traits>}\iref{over.match.oper}. |
| 4947 | +\end{note} |
| 4948 | + |
4854 | 4949 | \rSec3[string.cmp]{Non-member comparison operator functions}
|
4855 | 4950 | \begin{itemdecl}
|
4856 | 4951 | template<class charT, class traits, class Allocator>
|
|
0 commit comments