|
3919 | 3919 | basic_string<charT, traits, Allocator>
|
3920 | 3920 | operator+(const basic_string<charT, traits, Allocator>& lhs,
|
3921 | 3921 | const basic_string<charT, traits, Allocator>& rhs);
|
| 3922 | +template<class charT, class traits, class Allocator> |
| 3923 | + basic_string<charT, traits, Allocator> |
| 3924 | + operator+(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs); |
3922 | 3925 | \end{itemdecl}
|
3923 | 3926 |
|
3924 | 3927 | \begin{itemdescr}
|
3925 | 3928 | \pnum
|
3926 |
| -\returns |
3927 |
| -\tcode{basic_string<charT, traits, Allocator>(lhs).append(rhs)}. |
| 3929 | +\effects |
| 3930 | +Equivalent to: |
| 3931 | +\begin{codeblock} |
| 3932 | +basic_string<charT, traits, Allocator> r = lhs; |
| 3933 | +r.append(rhs); |
| 3934 | +return r; |
| 3935 | +\end{codeblock} |
3928 | 3936 | \end{itemdescr}
|
3929 | 3937 |
|
3930 | 3938 | \indexlibrarymember{operator+}{basic_string}%
|
|
3933 | 3941 | basic_string<charT, traits, Allocator>
|
3934 | 3942 | operator+(basic_string<charT, traits, Allocator>&& lhs,
|
3935 | 3943 | const basic_string<charT, traits, Allocator>& rhs);
|
3936 |
| -\end{itemdecl} |
3937 |
| - |
3938 |
| -\begin{itemdescr} |
3939 |
| -\pnum |
3940 |
| -\returns |
3941 |
| -\tcode{std::move(lhs.append(rhs))}. |
3942 |
| -\end{itemdescr} |
3943 |
| - |
3944 |
| -\indexlibrarymember{operator+}{basic_string}% |
3945 |
| -\begin{itemdecl} |
3946 | 3944 | template<class charT, class traits, class Allocator>
|
3947 | 3945 | basic_string<charT, traits, Allocator>
|
3948 |
| - operator+(const basic_string<charT, traits, Allocator>& lhs, |
3949 |
| - basic_string<charT, traits, Allocator>&& rhs); |
| 3946 | + operator+(basic_string<charT, traits, Allocator>&& lhs, const charT* rhs); |
3950 | 3947 | \end{itemdecl}
|
3951 | 3948 |
|
3952 | 3949 | \begin{itemdescr}
|
3953 | 3950 | \pnum
|
3954 |
| -\returns |
3955 |
| -\tcode{std::move(rhs.insert(0, lhs))}. |
| 3951 | +\effects |
| 3952 | +Equivalent to: |
| 3953 | +\begin{codeblock} |
| 3954 | +lhs.append(rhs); |
| 3955 | +return std::move(lhs); |
| 3956 | +\end{codeblock} |
3956 | 3957 | \end{itemdescr}
|
3957 | 3958 |
|
3958 | 3959 | \indexlibrarymember{operator+}{basic_string}%
|
|
3965 | 3966 |
|
3966 | 3967 | \begin{itemdescr}
|
3967 | 3968 | \pnum
|
3968 |
| -\returns |
3969 |
| -\tcode{std::move(lhs.append(rhs))}. |
| 3969 | +\effects |
| 3970 | +Equivalent to: |
| 3971 | +\begin{codeblock} |
| 3972 | +lhs.append(rhs); |
| 3973 | +return std::move(lhs); |
| 3974 | +\end{codeblock} |
| 3975 | +except that both \tcode{lhs} and \tcode{rhs} |
| 3976 | +are left in valid but unspecified states. |
3970 | 3977 | \begin{note}
|
3971 |
| -Or equivalently, \tcode{std::move(rhs.insert(0, lhs))}. |
| 3978 | +If \tcode{lhs} and \tcode{rhs} have equal allocators, |
| 3979 | +the implementation may move from either. |
3972 | 3980 | \end{note}
|
3973 | 3981 | \end{itemdescr}
|
3974 | 3982 |
|
3975 | 3983 | \indexlibrarymember{operator+}{basic_string}%
|
3976 | 3984 | \begin{itemdecl}
|
3977 | 3985 | template<class charT, class traits, class Allocator>
|
3978 | 3986 | basic_string<charT, traits, Allocator>
|
3979 |
| - operator+(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs); |
3980 |
| -\end{itemdecl} |
3981 |
| - |
3982 |
| -\begin{itemdescr} |
3983 |
| -\pnum |
3984 |
| -\returns |
3985 |
| -\tcode{basic_string<charT, traits, Allocator>(lhs) + rhs}. |
3986 |
| - |
3987 |
| -\pnum |
3988 |
| -\remarks |
3989 |
| -Uses |
3990 |
| -\tcode{traits::length()}. |
3991 |
| -\end{itemdescr} |
3992 |
| - |
3993 |
| -\indexlibrarymember{operator+}{basic_string}% |
3994 |
| -\begin{itemdecl} |
| 3987 | + operator+(const basic_string<charT, traits, Allocator>& lhs, |
| 3988 | + basic_string<charT, traits, Allocator>&& rhs); |
3995 | 3989 | template<class charT, class traits, class Allocator>
|
3996 | 3990 | basic_string<charT, traits, Allocator>
|
3997 | 3991 | operator+(const charT* lhs, basic_string<charT, traits, Allocator>&& rhs);
|
3998 | 3992 | \end{itemdecl}
|
3999 | 3993 |
|
4000 | 3994 | \begin{itemdescr}
|
4001 | 3995 | \pnum
|
4002 |
| -\returns |
4003 |
| -\tcode{std::move(rhs.insert(0, lhs))}. |
4004 |
| - |
4005 |
| -\pnum |
4006 |
| -\remarks |
4007 |
| -Uses |
4008 |
| -\tcode{traits::length()}. |
4009 |
| -\end{itemdescr} |
4010 |
| - |
4011 |
| -\indexlibrarymember{operator+}{basic_string}% |
4012 |
| -\begin{itemdecl} |
4013 |
| -template<class charT, class traits, class Allocator> |
4014 |
| - basic_string<charT, traits, Allocator> |
4015 |
| - operator+(charT lhs, const basic_string<charT, traits, Allocator>& rhs); |
4016 |
| -\end{itemdecl} |
4017 |
| - |
4018 |
| -\begin{itemdescr} |
4019 |
| -\pnum |
4020 |
| -\returns |
4021 |
| -\tcode{basic_string<charT, traits, Allocator>(1, lhs) + rhs}. |
| 3996 | +\effects |
| 3997 | +Equivalent to: |
| 3998 | +\begin{codeblock} |
| 3999 | +rhs.insert(0, lhs); |
| 4000 | +return std::move(rhs); |
| 4001 | +\end{codeblock} |
4022 | 4002 | \end{itemdescr}
|
4023 | 4003 |
|
4024 | 4004 | \indexlibrarymember{operator+}{basic_string}%
|
4025 | 4005 | \begin{itemdecl}
|
4026 | 4006 | template<class charT, class traits, class Allocator>
|
4027 | 4007 | basic_string<charT, traits, Allocator>
|
4028 |
| - operator+(charT lhs, basic_string<charT, traits, Allocator>&& rhs); |
| 4008 | + operator+(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs); |
4029 | 4009 | \end{itemdecl}
|
4030 | 4010 |
|
4031 | 4011 | \begin{itemdescr}
|
4032 | 4012 | \pnum
|
4033 |
| -\returns |
4034 |
| -\tcode{std::move(rhs.insert(0, 1, lhs))}. |
| 4013 | +\effects |
| 4014 | +Equivalent to: |
| 4015 | +\begin{codeblock} |
| 4016 | +basic_string<charT, traits, Allocator> r = rhs; |
| 4017 | +r.insert(0, lhs); |
| 4018 | +return r; |
| 4019 | +\end{codeblock} |
4035 | 4020 | \end{itemdescr}
|
4036 | 4021 |
|
4037 | 4022 | \indexlibrarymember{operator+}{basic_string}%
|
4038 | 4023 | \begin{itemdecl}
|
4039 | 4024 | template<class charT, class traits, class Allocator>
|
4040 | 4025 | basic_string<charT, traits, Allocator>
|
4041 |
| - operator+(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs); |
| 4026 | + operator+(charT lhs, const basic_string<charT, traits, Allocator>& rhs); |
4042 | 4027 | \end{itemdecl}
|
4043 | 4028 |
|
4044 | 4029 | \begin{itemdescr}
|
4045 | 4030 | \pnum
|
4046 |
| -\returns |
4047 |
| -\tcode{lhs + basic_string<charT, traits, Allocator>(rhs)}. |
4048 |
| - |
4049 |
| -\pnum |
4050 |
| -\remarks |
4051 |
| -Uses |
4052 |
| -\tcode{traits::length()}. |
| 4031 | +\effects |
| 4032 | +Equivalent to: |
| 4033 | +\begin{codeblock} |
| 4034 | +basic_string<charT, traits, Allocator> r = rhs; |
| 4035 | +r.insert(r.begin(), lhs); |
| 4036 | +return r; |
| 4037 | +\end{codeblock} |
4053 | 4038 | \end{itemdescr}
|
4054 | 4039 |
|
4055 | 4040 | \indexlibrarymember{operator+}{basic_string}%
|
4056 | 4041 | \begin{itemdecl}
|
4057 | 4042 | template<class charT, class traits, class Allocator>
|
4058 | 4043 | basic_string<charT, traits, Allocator>
|
4059 |
| - operator+(basic_string<charT, traits, Allocator>&& lhs, const charT* rhs); |
| 4044 | + operator+(charT lhs, basic_string<charT, traits, Allocator>&& rhs); |
4060 | 4045 | \end{itemdecl}
|
4061 | 4046 |
|
4062 | 4047 | \begin{itemdescr}
|
4063 | 4048 | \pnum
|
4064 |
| -\returns |
4065 |
| -\tcode{std::move(lhs.append(rhs))}. |
4066 |
| - |
4067 |
| -\pnum |
4068 |
| -\remarks |
4069 |
| -Uses |
4070 |
| -\tcode{traits::length()}. |
| 4049 | +\effects |
| 4050 | +Equivalent to: |
| 4051 | +\begin{codeblock} |
| 4052 | +rhs.insert(rhs.begin(), lhs); |
| 4053 | +return std::move(rhs); |
| 4054 | +\end{codeblock} |
4071 | 4055 | \end{itemdescr}
|
4072 | 4056 |
|
4073 | 4057 | \indexlibrarymember{operator+}{basic_string}%
|
|
4079 | 4063 |
|
4080 | 4064 | \begin{itemdescr}
|
4081 | 4065 | \pnum
|
4082 |
| -\returns |
4083 |
| -\tcode{lhs + basic_string<charT, traits, Allocator>(1, rhs)}. |
| 4066 | +\effects |
| 4067 | +Equivalent to: |
| 4068 | +\begin{codeblock} |
| 4069 | +basic_string<charT, traits, Allocator> r = lhs; |
| 4070 | +r.push_back(rhs); |
| 4071 | +return r; |
| 4072 | +\end{codeblock} |
4084 | 4073 | \end{itemdescr}
|
4085 | 4074 |
|
4086 | 4075 | \indexlibrarymember{operator+}{basic_string}%
|
|
4092 | 4081 |
|
4093 | 4082 | \begin{itemdescr}
|
4094 | 4083 | \pnum
|
4095 |
| -\returns |
4096 |
| -\tcode{std::move(lhs.append(1, rhs))}. |
| 4084 | +\effects |
| 4085 | +Equivalent to: |
| 4086 | +\begin{codeblock} |
| 4087 | +lhs.push_back(rhs); |
| 4088 | +return std::move(lhs); |
| 4089 | +\end{codeblock} |
4097 | 4090 | \end{itemdescr}
|
4098 | 4091 |
|
4099 | 4092 | \rSec3[string.operator==]{\tcode{operator==}}
|
|
0 commit comments