|
895 | 895 | explicit basic_string(const Allocator& a) noexcept;
|
896 | 896 | basic_string(const basic_string& str);
|
897 | 897 | basic_string(basic_string&& str) noexcept;
|
898 |
| - basic_string(const basic_string& str, size_type pos, size_type n = npos, |
| 898 | + basic_string(const basic_string& str, size_type pos, |
| 899 | + const Allocator& a = Allocator()); |
| 900 | + basic_string(const basic_string& str, size_type pos, size_type n, |
899 | 901 | const Allocator& a = Allocator());
|
900 | 902 | basic_string(const charT* s,
|
901 | 903 | size_type n, const Allocator& a = Allocator());
|
|
1181 | 1183 |
|
1182 | 1184 | \indexlibrary{\idxcode{basic_string}!constructor}%
|
1183 | 1185 | \begin{itemdecl}
|
1184 |
| -basic_string(const basic_string& str, |
1185 |
| - size_type pos, size_type n = npos, |
| 1186 | +basic_string(const basic_string& str, size_type pos, |
1186 | 1187 | const Allocator& a = Allocator());
|
1187 | 1188 | \end{itemdecl}
|
1188 | 1189 |
|
|
1198 | 1199 | Constructs an object of class
|
1199 | 1200 | \tcode{basic_string}
|
1200 | 1201 | and determines the effective length \tcode{rlen} of the initial string
|
1201 |
| -value as the smaller of \tcode{n} and |
1202 |
| -\tcode{str.size() - pos}, |
| 1202 | +value as \tcode{str.size() - pos}, |
| 1203 | +as indicated in Table~\ref{tab:strings.ctr.2}. |
| 1204 | +\end{itemdescr} |
| 1205 | + |
| 1206 | +\indexlibrary{\idxcode{basic_string}!constructor}% |
| 1207 | +\begin{itemdecl} |
| 1208 | +basic_string(const basic_string& str, size_type pos, size_type n, |
| 1209 | + const Allocator& a = Allocator()); |
| 1210 | +\end{itemdecl} |
| 1211 | + |
| 1212 | +\begin{itemdescr} |
| 1213 | +\pnum |
| 1214 | +\throws |
| 1215 | +\tcode{out_of_range} if \tcode{pos > str.size()}. |
| 1216 | + |
| 1217 | +\pnum |
| 1218 | +\effects |
| 1219 | +Constructs an object of class \tcode{basic_string} |
| 1220 | +and determines the effective length \tcode{rlen} of the initial string |
| 1221 | +value as the smaller of \tcode{n} and \tcode{str.size() - pos}, |
1203 | 1222 | as indicated in Table~\ref{tab:strings.ctr.2}.
|
1204 | 1223 |
|
1205 | 1224 | \begin{libefftabvalue}
|
1206 |
| -{\tcode{basic_string(const basic_string\&, size_type, size_type, const Allocator\&)} effects} |
| 1225 | +{\tcode{basic_string(const basic_string\&, size_type, const Allocator\&)}\protect\linebreak and |
| 1226 | +\tcode{basic_string(const basic_string\&, size_type, size_type, const Allocator\&)} effects} |
1207 | 1227 | {tab:strings.ctr.2}
|
1208 | 1228 | \tcode{data()} &
|
1209 | 1229 | points at the first element of an allocated copy of \tcode{rlen} consecutive elements
|
|
0 commit comments