From 5c06af79f20165963f38ce392bf1759132fe1793 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Thu, 18 Sep 2014 11:33:58 +1000 Subject: [PATCH 01/10] [allocator.requirements] Removed unused variable a3 in Table 27. --- source/lib-intro.tex | 1 - 1 file changed, 1 deletion(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index e8907bb037..c69e318a7c 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1643,7 +1643,6 @@ \tcode{YY} & the type \tcode{allocator_traits} \\ \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{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 From 275ec10106bb6596b5f3575ef7f2fd3eb744cc8d Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Thu, 18 Sep 2014 11:41:26 +1000 Subject: [PATCH 02/10] [allocator.requirements] Removed unused variable t in Table 27. --- source/lib-intro.tex | 1 - 1 file changed, 1 deletion(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index c69e318a7c..2c952b0017 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1641,7 +1641,6 @@ \tcode{Y} & the corresponding Allocator class for type \tcode{U} \\ \rowsep \tcode{XX} & the type \tcode{allocator_traits} \\ \rowsep \tcode{YY} & the type \tcode{allocator_traits} \\ \rowsep -\tcode{t} & a value of type \tcode{const T\&} \\ \rowsep \tcode{a, a1, a2} & values of type \tcode{X\&} \\ \rowsep \tcode{b} & a value of type \tcode{Y} \\ \rowsep \tcode{c} & a pointer of type \tcode{C*} through which indirection is valid \\ \rowsep From fe5a5cc87a37a983f56de2b49ae408cd2d4b6595 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Thu, 18 Sep 2014 11:45:50 +1000 Subject: [PATCH 03/10] [allocator.requirements] Removed unused variables r and s in Table 27. --- source/lib-intro.tex | 5 ----- 1 file changed, 5 deletions(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 2c952b0017..4f15db5456 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1652,11 +1652,6 @@ conversion from a value \tcode{p} \\ \rowsep \tcode{z} & 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 conversion from a result value of \tcode{YY::allocate}, or else a value of type (possibly \tcode{const}) \tcode{std::nullptr_t}. \\ \rowsep From 9316ca41142c7330aeda324032bcc7a3cf5bffcd Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Thu, 18 Sep 2014 11:48:40 +1000 Subject: [PATCH 04/10] [allocator.requirements] Removed unused variables V and v in Table 27. --- source/lib-intro.tex | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 4f15db5456..8f9e511198 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1636,7 +1636,6 @@ \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} \\ \rowsep @@ -1655,7 +1654,6 @@ \tcode{u} & 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\&\&} \\ From 89f1e73f4dc681b7d0afb9aeb03597be279ebcd0 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Thu, 18 Sep 2014 11:35:01 +1000 Subject: [PATCH 05/10] [allocator.requirements] Fixed types for a, a1, a2 in Table 27. It doesn't make sense to re-use values of type X& when declaring a new X, as in the use of these variables in Table 28. --- source/lib-intro.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 8f9e511198..b9c3f58516 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1640,7 +1640,7 @@ \tcode{Y} & the corresponding Allocator class for type \tcode{U} \\ \rowsep \tcode{XX} & the type \tcode{allocator_traits} \\ \rowsep \tcode{YY} & the type \tcode{allocator_traits} \\ \rowsep -\tcode{a, a1, a2} & values of type \tcode{X\&} \\ \rowsep +\tcode{a, a1, a2} & lvalues of type \tcode{X} \\ \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 From 249bf9f17a2654a97f213532680de67240efbce2 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Thu, 18 Sep 2014 11:57:16 +1000 Subject: [PATCH 06/10] [containers] Made phrasing for "a value of type X" more consistent. --- source/containers.tex | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 781acae733..622e9a80fe 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -740,7 +740,7 @@ 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} +\tcode{a} denotes a value of type \tcode{X} containing elements of type \tcode{T}, \tcode{A} denotes \tcode{X::allocator_type} if it exists and \tcode{std::allocator} if it doesn't, \tcode{i} and \tcode{j} @@ -750,7 +750,7 @@ denotes a valid range, \tcode{il} designates an object of type \tcode{initializer_list}, \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 @@ -1247,12 +1247,12 @@ \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{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} @@ -1264,8 +1264,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}, -\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} From 09c0f98eed78b674ae735c963e651554476603ac Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Thu, 18 Sep 2014 13:17:56 +1000 Subject: [PATCH 07/10] [allocator.requirements] Made Tables 27/28 consistent in the use of u. In other tables of requirements, the identifier 'u' is used for variables being declared. Made that the case here, too. This necessitated a reflow of other variable names. --- source/lib-intro.tex | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index b9c3f58516..992cc40eff 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1641,6 +1641,7 @@ \tcode{XX} & the type \tcode{allocator_traits} \\ \rowsep \tcode{YY} & the type \tcode{allocator_traits} \\ \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 @@ -1649,9 +1650,9 @@ 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{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{n} & a value of type \tcode{XX::size_type}. \\ \rowsep @@ -1729,9 +1730,9 @@ \tcode{X::pointer} & \tcode{static_cast(w)} \tcode{== p} & \\ \rowsep -\tcode{static_cast(z)} & +\tcode{static_cast(x)} & \tcode{X::const_pointer} & - \tcode{static_cast(z)} \tcode{== q} & \\ \rowsep + \tcode{static_cast(x)} \tcode{== q} & \\ \rowsep \tcode{a.allocate(n)} & \tcode{X::pointer} & Memory is allocated for \tcode{n} objects of type \tcode{T} but objects @@ -1740,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 @@ -1776,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 From b44682cc6e68a0bc55cc28e74990a537ac01d54e Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Thu, 18 Sep 2014 13:27:20 +1000 Subject: [PATCH 08/10] [sequence.reqmts] Made Table 100 consistent in the use of u. In other tables of requirements, the identifier 'u' is used for variables being declared. Made that the case here, too. --- source/containers.tex | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 622e9a80fe..1e614ef31a 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -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 type \tcode{X} containing elements of type \tcode{T}, \tcode{A} -denotes \tcode{X::allocator_type} if it exists and \tcode{std::allocator} 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} if it doesn't, \tcode{i} and \tcode{j} denote iterators satisfying input iterator requirements @@ -779,7 +780,7 @@ & & \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 @@ -787,7 +788,7 @@ 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 From 2b14c8a3348cf39b40ac1964a850c35d7f20b617 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Thu, 18 Sep 2014 13:30:30 +1000 Subject: [PATCH 09/10] [associative.reqmts] Made Table 102 consistent in the use of u. In other tables of requirements, the identifier 'u' is used for variables being declared. Made that the case here, too. --- source/containers.tex | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 1e614ef31a..7e72d93216 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -1249,6 +1249,7 @@ In Table~\ref{tab:containers.associative.requirements}, \tcode{X} denotes an associative container class, \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 type \tcode{X} @@ -1324,14 +1325,14 @@ 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. @@ -1339,7 +1340,7 @@ 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 @@ -1348,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 From e1c08b02ff97ac646418c2ecc5ef0b54c6fce1ae Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Thu, 18 Sep 2014 13:36:12 +1000 Subject: [PATCH 10/10] [associative.reqmts] Made intro wording for Table 103 more consistent. Both internally (it was inconsistent in "value" vs. "object") and externally (Tables 100 and 102 use "value"). While I was at it, fixed capitalization of the word "table" and fixed up TeX formatting. --- source/containers.tex | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 7e72d93216..ab21ccae1f 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -1761,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}, -\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)}