Skip to content
Closed
Show file tree
Hide file tree
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
67 changes: 34 additions & 33 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,9 @@
In Tables~\ref{tab:containers.sequence.requirements}
and \ref{tab:containers.sequence.optional}, \tcode{X}
denotes a sequence container class,
\tcode{a} denotes a value of \tcode{X} containing elements of type \tcode{T}, \tcode{A}
denotes \tcode{X::allocator_type} if it exists and \tcode{std::allocator<T>} if it
\tcode{a} denotes a value of type \tcode{X} containing elements of type \tcode{T},
\tcode{u} denotes the name of a variable being declared,
\tcode{A} denotes \tcode{X::allocator_type} if it exists and \tcode{std::allocator<T>} if it
doesn't,
\tcode{i} and \tcode{j}
denote iterators satisfying input iterator requirements
Expand All @@ -750,7 +751,7 @@
denotes a valid range,
\tcode{il} designates an object of type \tcode{initializer_list<value_type>},
\tcode{n}
denotes a value of \tcode{X::size_type},
denotes a value of type \tcode{X::size_type},
\tcode{p} denotes a valid const iterator to
\tcode{a}, \tcode{q}
denotes a valid dereferenceable const iterator to
Expand Down Expand Up @@ -779,15 +780,15 @@
& & \rhdr{pre-/post-condition} \\ \capsep
\endhead
\tcode{X(n, t)}\br
\tcode{X a(n, t)} &
\tcode{X u(n, t)} &
&
\requires \tcode{T} shall be
\tcode{CopyInsertable} into \tcode{X}.\br
post: \tcode{distance(begin(), end()) == n}\br
Constructs a sequence container with \tcode{n} copies of \tcode{t} \\ \rowsep

\tcode{X(i, j)}\br
\tcode{X a(i, j)} &
\tcode{X u(i, j)} &
&
\requires\ \tcode{T} shall be \tcode{EmplaceConstructible} into \tcode{X} from \tcode{*i}.
For \tcode{vector}, if the iterator does
Expand Down Expand Up @@ -1247,12 +1248,13 @@
\pnum
In Table~\ref{tab:containers.associative.requirements},
\tcode{X} denotes an associative container class,
\tcode{a} denotes a value of \tcode{X},
\tcode{a_uniq} denotes a value of \tcode{X}
\tcode{a} denotes a value of type \tcode{X},
\tcode{u} denotes the name of a variable being declared,
\tcode{a_uniq} denotes a value of type \tcode{X}
when \tcode{X} supports unique keys,
\tcode{a_eq} denotes a value of \tcode{X}
\tcode{a_eq} denotes a value of type \tcode{X}
when \tcode{X} supports multiple keys,
\tcode{a_tran} denotes a value of \tcode{X} when the qualified-id
\tcode{a_tran} denotes a value of type \tcode{X} when the qualified-id
\tcode{X::key_compare::is_transparent} is valid
and denotes a type~(\ref{temp.deduct}),
\tcode{i} and \tcode{j}
Expand All @@ -1264,8 +1266,8 @@
\tcode{q} denotes a valid dereferenceable const iterator to \tcode{a},
\tcode{[q1, q2)} denotes a valid range of const iterators in \tcode{a},
\tcode{il} designates an object of type \tcode{initializer_list<value_type>},
\tcode{t} denotes a value of \tcode{X::value_type},
\tcode{k} denotes a value of \tcode{X::key_type}
\tcode{t} denotes a value of type \tcode{X::value_type},
\tcode{k} denotes a value of type \tcode{X::key_type}
and \tcode{c} denotes a value of type \tcode{X::key_compare};
\tcode{kl} is a value such that \tcode{a} is partitioned~(\ref{alg.sorting})
with respect to \tcode{c(r, kl)}, with \tcode{r} the key value of \tcode{e}
Expand Down Expand Up @@ -1323,22 +1325,22 @@
compile time \\ \rowsep

\tcode{X(c)}\br
\tcode{X a(c);} &
\tcode{X u(c);} &
&
\requires\ \tcode{key_compare} is \tcode{CopyConstructible}.\br
\effects\ Constructs an empty container.
Uses a copy of \tcode{c} as a comparison object. &
constant \\ \rowsep

\tcode{X()}\br\tcode{X a;} &
\tcode{X()}\br\tcode{X u;} &
&
\requires\ \tcode{key_compare} is \tcode{DefaultConstructible}.\br
\effects\ Constructs an empty container.
Uses \tcode{Compare()} as a comparison object &
constant \\ \rowsep

\tcode{X(i,j,c)}\br
\tcode{X~a(i,j,c);} &
\tcode{X~u(i,j,c);} &
&
\requires\ \tcode{key_compare} is \tcode{CopyConstructible}.
\tcode{value_type} is \tcode{EmplaceConstructible} into \tcode{X} from \tcode{*i}.\br
Expand All @@ -1347,7 +1349,7 @@
$N \log N$ in general ($N$ has the value \tcode{distance(i, j)});
linear if \tcode{[i, j)} is sorted with \tcode{value_comp()} \\ \rowsep

\tcode{X(i,j)} \tcode{X~a(i,j);} &
\tcode{X(i,j)} \tcode{X~u(i,j);} &
&
\requires\ \tcode{key_compare} is \tcode{DefaultConstructible}.
\tcode{value_type} is \tcode{EmplaceConstructible} into \tcode{X} from \tcode{*i}.\br
Expand Down Expand Up @@ -1759,25 +1761,24 @@
\indextext{unordered associative containers!unique keys}%
\indextext{unordered associative containers!equivalent keys}%
\indextext{requirements!container}%
In table~\ref{tab:HashRequirements}:
\tcode{X} is an unordered associative container class, \tcode{a} is an
object of type \tcode{X}, \tcode{b} is a possibly const object of
type \tcode{X}, \tcode{a_uniq} is an object of type \tcode{X}
when \tcode{X} supports unique keys, \tcode{a_eq} is an object of
type \tcode{X} when \tcode{X} supports equivalent keys, \tcode{i}
and \tcode{j} are input iterators that refer
to \tcode{value_type}, \tcode{[i, j)} is a valid range,
\tcode{p} and \tcode{q2} are valid const iterators to \tcode{a},
\tcode{q} and \tcode{q1} are valid dereferenceable const iterators to \tcode{a},
\tcode{[q1, q2)} is a valid range in \tcode{a},
In Table~\ref{tab:HashRequirements}:
\tcode{X} denotes an unordered associative container class,
\tcode{a} denotes a value of type \tcode{X},
\tcode{b} denotes a possibly const value of type \tcode{X},
\tcode{a_uniq} denotes a value of type \tcode{X} when \tcode{X} supports unique keys,
\tcode{a_eq} denotes a value of type \tcode{X} when \tcode{X} supports equivalent keys,
\tcode{i} and \tcode{j} denote input iterators that refer to \tcode{value_type},
\tcode{[i, j)} denotes a valid range,
\tcode{p} and \tcode{q2} denote valid const iterators to \tcode{a},
\tcode{q} and \tcode{q1} denote valid dereferenceable const iterators to \tcode{a},
\tcode{[q1, q2)} denotes a valid range in \tcode{a},
\tcode{il} designates an object of type \tcode{initializer_list<value_type>},
\tcode{t} is a value of
type \tcode{X::value_type}, \tcode{k} is a value of
type \tcode{key_type}, \tcode{hf} is a possibly const value of
type \tcode{hasher}, \tcode{eq} is a possibly const value of
type \tcode{key_equal}, \tcode{n} is a value of
type \tcode{size_type}, and \tcode{z} is a value of
type \tcode{float}.
\tcode{t} denotes a value of type \tcode{X::value_type},
\tcode{k} denotes a value of type \tcode{key_type},
\tcode{hf} denotes a possibly const value of type \tcode{hasher},
\tcode{eq} denotes a possibly const value of type \tcode{key_equal},
\tcode{n} denotes a value of type \tcode{size_type},
and \tcode{z} denotes a value of type \tcode{float}.

\begin{libreqtab4d}
{Unordered associative container requirements (in addition to container)}
Expand Down
36 changes: 14 additions & 22 deletions source/lib-intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1636,14 +1636,12 @@
\lhdr{Variable} & \rhdr{Definition} \\ \capsep
\endhead
\tcode{T, U, C} & any non-const object type~(\ref{basic.types}) \\ \rowsep
\tcode{V} & a type convertible to \tcode{T} \\ \rowsep
\tcode{X} & an Allocator class for type \tcode{T} \\ \rowsep
\tcode{Y} & the corresponding Allocator class for type \tcode{U} \\ \rowsep
\tcode{XX} & the type \tcode{allocator_traits<X>} \\ \rowsep
\tcode{YY} & the type \tcode{allocator_traits<Y>} \\ \rowsep
\tcode{t} & a value of type \tcode{const T\&} \\ \rowsep
\tcode{a, a1, a2} & values of type \tcode{X\&} \\ \rowsep
\tcode{a3} & an rvalue of type \tcode{X} \\ \rowsep
\tcode{a, a1, a2} & lvalues of type \tcode{X} \\ \rowsep
\tcode{u} & the name of a variable being declared \\ \rowsep
\tcode{b} & a value of type \tcode{Y} \\ \rowsep
\tcode{c} & a pointer of type \tcode{C*} through which indirection is valid \\ \rowsep
\tcode{p} & a value of type \tcode{XX::pointer}, obtained
Expand All @@ -1652,17 +1650,11 @@
obtained by conversion from a value \tcode{p}. \\ \rowsep
\tcode{w} & a value of type \tcode{XX::void_pointer} obtained by
conversion from a value \tcode{p} \\ \rowsep
\tcode{z} & a value of type \tcode{XX::const_void_pointer} obtained by
\tcode{x} & a value of type \tcode{XX::const_void_pointer} obtained by
conversion from a value \tcode{q} or a value \tcode{w} \\ \rowsep
\tcode{r} & a value of type \tcode{T\&}
obtained by the expression \tcode{*p}. \\ \rowsep
\tcode{s} & a value of type \tcode{const T\&}
obtained by the expression \tcode{*q} or by conversion from
a value \tcode{r}. \\ \rowsep
\tcode{u} & a value of type \tcode{XX:const_void_pointer} obtained by
\tcode{y} & a value of type \tcode{XX:const_void_pointer} obtained by
conversion from a result value of \tcode{YY::allocate}, or else a value of
type (possibly \tcode{const}) \tcode{std::nullptr_t}. \\ \rowsep
\tcode{v} & a value of type \tcode{V} \\ \rowsep
\tcode{n} & a value of type \tcode{XX::size_type}. \\ \rowsep
\tcode{Args} & a template parameter pack \\ \rowsep
\tcode{args} & a function parameter pack with the pattern \tcode{Args\&\&} \\
Expand Down Expand Up @@ -1738,9 +1730,9 @@
\tcode{X::pointer} &
\tcode{static_cast<X::pointer>(w)} \tcode{== p} & \\ \rowsep

\tcode{static_cast<X} \tcode{::const_pointer>(z)} &
\tcode{static_cast<X} \tcode{::const_pointer>(x)} &
\tcode{X::const_pointer} &
\tcode{static_cast<X} \tcode{::const_pointer>(z)} \tcode{== q} & \\ \rowsep
\tcode{static_cast<X} \tcode{::const_pointer>(x)} \tcode{== q} & \\ \rowsep

\tcode{a.allocate(n)} & \tcode{X::pointer} &
Memory is allocated for \tcode{n} objects of type \tcode{T} but objects
Expand All @@ -1749,9 +1741,9 @@
If \tcode{n == 0}, the return value is unspecified.
\exitnote & \\ \rowsep

\tcode{a.allocate(n, u)} &
\tcode{a.allocate(n, y)} &
\tcode{X::pointer} &
Same as \tcode{a.allocate(n)}. The use of \tcode{u} is unspecified, but
Same as \tcode{a.allocate(n)}. The use of \tcode{y} is unspecified, but
it is intended as an aid to locality. &
\tcode{a.allocate(n)} \\ \rowsep

Expand Down Expand Up @@ -1785,24 +1777,24 @@
\tcode{bool} &
same as \tcode{!(a == b)} & \\ \rowsep

\tcode{X a1(a)}; \br
\tcode{X a1 = a;} &
\tcode{X u(a)}; \br
\tcode{X u = a;} &
&
Shall not exit via an exception.\br
post: \tcode{a1 == a} & \\ \rowsep

\tcode{X a(b);} &
\tcode{X u(b);} &
&
Shall not exit via an exception.\br
post: \tcode{Y(a) == b}, \tcode{a == X(b)} & \\ \rowsep

\tcode{X a1(move(a));} \br
\tcode{X a1 = move(a);} &
\tcode{X u(move(a));} \br
\tcode{X u = move(a);} &
&
Shall not exit via an exception.\br
post: \tcode{a1} equals the prior value of \tcode{a}. & \\ \rowsep

\tcode{X a(move(b));} &
\tcode{X u(move(b));} &
&
Shall not exit via an exception.\br
post: \tcode{a} equals the prior value of \tcode{X(b)}. & \\ \rowsep
Expand Down