Skip to content

[string.view] Exposition-only formatting for data_ and size_ #7818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions source/strings.tex
Original file line number Diff line number Diff line change
@@ -732,8 +732,8 @@
constexpr size_type find_last_not_of(const charT* s, size_type pos = npos) const;

private:
const_pointer data_; // \expos
size_type size_; // \expos
const_pointer @\exposid{data_}@; // \expos
size_type @\exposid{size_}@; // \expos
};

// \ref{string.view.deduct}, deduction guides
@@ -778,7 +778,7 @@
\begin{itemdescr}
\pnum
\ensures
\tcode{size_ == 0} and \tcode{data_ == nullptr}.
\tcode{\exposid{size_} == 0} and \tcode{\exposid{data_} == nullptr}.
\end{itemdescr}

\indexlibraryctor{basic_string_view}%
@@ -793,8 +793,8 @@

\pnum
\effects
Constructs a \tcode{basic_string_view}, initializing \tcode{data_} with \tcode{str}
and initializing \tcode{size_} with \tcode{traits::length(str)}.
Constructs a \tcode{basic_string_view}, initializing \exposid{data_} with \tcode{str}
and initializing \exposid{size_} with \tcode{traits::length(str)}.

\pnum
\complexity
@@ -813,8 +813,8 @@

\pnum
\effects
Constructs a \tcode{basic_string_view}, initializing \tcode{data_} with \tcode{str}
and initializing \tcode{size_} with \tcode{len}.
Constructs a \tcode{basic_string_view}, initializing \exposid{data_} with \tcode{str}
and initializing \exposid{size_} with \tcode{len}.
\end{itemdescr}

\indexlibraryctor{basic_string_view}%
@@ -843,8 +843,8 @@

\pnum
\effects
Initializes \tcode{data_} with \tcode{to_address(begin)} and
initializes \tcode{size_} with \tcode{end - begin}.
Initializes \exposid{data_} with \tcode{to_address(begin)} and
initializes \exposid{size_} with \tcode{end - begin}.

\pnum
\throws
@@ -880,8 +880,8 @@

\pnum
\effects
Initializes \tcode{data_} with \tcode{ranges::data(r)} and
\tcode{size_} with \tcode{ranges::size(r)}.
Initializes \exposid{data_} with \tcode{ranges::data(r)} and
\exposid{size_} with \tcode{ranges::size(r)}.

\pnum
\throws
@@ -947,7 +947,7 @@
\returns
An iterator such that
\begin{itemize}
\item if \tcode{!empty()}, \tcode{addressof(*begin()) == data_},
\item if \tcode{!empty()}, \tcode{addressof(*begin()) == \exposid{data_}},
\item otherwise, an unspecified value such that \range{begin()}{end()} is a valid range.
\end{itemize}
\end{itemdescr}
@@ -1003,7 +1003,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{size_}.
\exposid{size_}.
\end{itemdescr}


@@ -1026,7 +1026,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{size_ == 0}.
\tcode{\exposid{size_} == 0}.
\end{itemdescr}

\rSec3[string.view.access]{Element access}
@@ -1046,7 +1046,7 @@

\pnum
\returns
\tcode{data_[pos]}.
\tcode{\exposid{data_}[pos]}.

\pnum
\throws
@@ -1061,7 +1061,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{data_[pos]}.
\tcode{\exposid{data_}[pos]}.

\pnum
\throws
@@ -1080,7 +1080,7 @@

\pnum
\returns
\tcode{data_[0]}.
\tcode{\exposid{data_}[0]}.

\pnum
\throws
@@ -1099,7 +1099,7 @@

\pnum
\returns
\tcode{data_[size() - 1]}.
\tcode{\exposid{data_}[size() - 1]}.

\pnum
\throws
@@ -1114,7 +1114,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{data_}.
\exposid{data_}.

\pnum
\begin{note}
@@ -1138,7 +1138,7 @@

\pnum
\effects
Equivalent to: \tcode{data_ += n; size_ -= n;}
Equivalent to: \tcode{\exposid{data_} += n; \exposid{size_} -= n;}
\end{itemdescr}

\indexlibrarymember{remove_suffix}{basic_string_view}%
@@ -1153,7 +1153,7 @@

\pnum
\effects
Equivalent to: \tcode{size_ -= n;}
Equivalent to: \tcode{\exposid{size_} -= n;}
\end{itemdescr}

\indexlibrarymember{swap}{basic_string_view}%
@@ -1446,7 +1446,7 @@
\item
\tcode{xpos + str.size() <= size()}
\item
\tcode{traits::eq(data_[xpos + I], str[I])} for all elements \tcode{I} of the string referenced by \tcode{str}.
\tcode{traits::eq(\exposid{data_}[xpos + I], str[I])} for all elements \tcode{I} of the string referenced by \tcode{str}.
\end{itemize}

\pnum
@@ -1473,7 +1473,7 @@
\item
\tcode{xpos + str.size() <= size()}
\item
\tcode{traits::eq(data_[xpos + I], str[I])} for all elements \tcode{I} of the string referenced by \tcode{str}.
\tcode{traits::eq(\exposid{data_}[xpos + I], str[I])} for all elements \tcode{I} of the string referenced by \tcode{str}.
\end{itemize}

\pnum
@@ -1500,7 +1500,7 @@
\item
\tcode{xpos < size()}
\item
\tcode{traits::eq(data_[xpos], str[I])} for some element \tcode{I} of the string referenced by \tcode{str}.
\tcode{traits::eq(\exposid{data_}[xpos], str[I])} for some element \tcode{I} of the string referenced by \tcode{str}.
\end{itemize}

\pnum
@@ -1527,7 +1527,7 @@
\item
\tcode{xpos < size()}
\item
\tcode{traits::eq(data_[xpos], str[I])} for some element \tcode{I} of the string referenced by \tcode{str}.
\tcode{traits::eq(\exposid{data_}[xpos], str[I])} for some element \tcode{I} of the string referenced by \tcode{str}.
\end{itemize}

\pnum
@@ -1554,7 +1554,7 @@
\item
\tcode{xpos < size()}
\item
\tcode{traits::eq(data_[xpos], str[I])} for no element \tcode{I} of the string referenced by \tcode{str}.
\tcode{traits::eq(\exposid{data_}[xpos], str[I])} for no element \tcode{I} of the string referenced by \tcode{str}.
\end{itemize}

\pnum
@@ -1580,7 +1580,7 @@
\item
\tcode{xpos < size()}
\item
\tcode{traits::eq(data_[xpos], str[I])} for no element \tcode{I} of the string referenced by \tcode{str}.
\tcode{traits::eq(\exposid{data_}[xpos], str[I])} for no element \tcode{I} of the string referenced by \tcode{str}.
\end{itemize}

\pnum