|
519 | 519 | \rSec2[string.view.general]{General} |
520 | 520 |
|
521 | 521 | \pnum |
522 | | -The class template \tcode{basic_string_view} describes an object that can refer to a constant contiguous sequence of char-like\iref{strings.general} objects with the first element of the sequence at position zero. |
523 | | -In the rest of \ref{string.view}, the type of the char-like objects held in a \tcode{basic_string_view} object is designated by \tcode{charT}. |
| 522 | +The class template \tcode{basic_string_view} describes an object |
| 523 | +that can refer to a constant contiguous sequence of char-like\iref{strings.general} objects |
| 524 | +with the first element of the sequence at position zero. |
| 525 | +In the rest of \ref{string.view}, the type of the char-like objects |
| 526 | +held in a \tcode{basic_string_view} object is designated by \tcode{charT}. |
524 | 527 |
|
525 | 528 | \pnum |
526 | 529 | \begin{note} |
527 | | -The library provides implicit conversions from \tcode{const charT*} and \tcode{std::basic_string<charT, ...>} to \tcode{std::basic_string_view<charT, ...>} so that user code can accept just \tcode{std::basic_string_view<charT>} as a non-templated parameter wherever a sequence of characters is expected. |
528 | | -User-defined types can define their own implicit conversions to \tcode{std::basic_string_view<charT>} in order to interoperate with these functions. |
| 530 | +The library provides implicit conversions from \tcode{const charT*} |
| 531 | +and \tcode{std::basic_string<charT, ...>} to \tcode{std::basic_string_view<charT, ...>} |
| 532 | +so that user code can accept just \tcode{std::basic_string_view<charT>} |
| 533 | +as a non-templated parameter wherever a sequence of characters is expected. |
| 534 | +User-defined types can define their own implicit conversions |
| 535 | +to \tcode{std::basic_string_view<charT>} in order to interoperate with these functions. |
529 | 536 | \end{note} |
530 | 537 |
|
531 | 538 | \rSec2[string.view.synop]{Header \tcode{<string_view>} synopsis} |
|
934 | 941 | whose \tcode{value_type} is the template parameter \tcode{charT}. |
935 | 942 |
|
936 | 943 | \pnum |
937 | | -All requirements on container iterators\iref{container.requirements} apply to \tcode{basic_string_view::const_iterator} as well. |
| 944 | +All requirements on container iterators\iref{container.requirements} |
| 945 | +apply to \tcode{basic_string_view::const_iterator} as well. |
938 | 946 | \end{itemdescr} |
939 | 947 |
|
940 | 948 | \indexlibrarymember{begin}{basic_string_view}% |
|
1017 | 1025 | \begin{itemdescr} |
1018 | 1026 | \pnum |
1019 | 1027 | \returns |
1020 | | -The largest possible number of char-like objects that can be referred to by a \tcode{basic_string_view}. |
| 1028 | +The largest possible number of char-like objects |
| 1029 | +that can be referred to by a \tcode{basic_string_view}. |
1021 | 1030 | \end{itemdescr} |
1022 | 1031 |
|
1023 | 1032 | \indexlibrarymember{empty}{basic_string_view}% |
|
1122 | 1131 | \begin{note} |
1123 | 1132 | Unlike \tcode{basic_string::data()} and \grammarterm{string-literal}s, |
1124 | 1133 | \tcode{data()} can return a pointer to a buffer that is not null-terminated. |
1125 | | -Therefore it is typically a mistake to pass \tcode{data()} to a function that takes just a \tcode{const charT*} and expects a null-terminated string. |
| 1134 | +Therefore it is typically a mistake to pass \tcode{data()} to a function |
| 1135 | +that takes just a \tcode{const charT*} and expects a null-terminated string. |
1126 | 1136 | \end{note} |
1127 | 1137 | \end{itemdescr} |
1128 | 1138 |
|
|
0 commit comments