Skip to content

Commit 7c91ada

Browse files
committed
[lib] Fix cross-references to container requirements tables
1 parent 3c07b83 commit 7c91ada

File tree

3 files changed

+95
-61
lines changed

3 files changed

+95
-61
lines changed

source/containers.tex

Lines changed: 90 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
\end{libsumtab}
3232

3333

34-
\rSec1[container.requirements]{Container requirements}%
34+
\rSec1[container.requirements]{Requirements}%
3535
\indextext{requirements!container}
3636

37-
\rSec2[container.requirements.general]{General container requirements}
37+
\rSec2[container.requirements.pre]{Preamble}
3838

3939
\pnum
4040
Containers are objects that store other objects.
@@ -54,7 +54,7 @@
5454
\end{example}
5555

5656
\pnum
57-
Allocator-aware containers (\tref{container.alloc.req})
57+
Allocator-aware containers\iref{container.alloc.reqmts}
5858
other than \tcode{basic_string} construct elements using the function
5959
\tcode{allocator_traits<allocator_type>::rebind_traits<U>::\brk{}construct}
6060
and destroy elements using the function
@@ -69,8 +69,12 @@
6969
aligned buffers and call \tcode{construct} to place the element into the buffer.
7070
\end{note}
7171

72+
\rSec2[container.gen.reqmts]{General containers}
73+
74+
\rSec3[container.requirements.general]{General}
75+
7276
\pnum
73-
In this subclause,
77+
In subclause \ref{container.gen.reqmts},
7478
\begin{itemize}
7579
\item
7680
\tcode{X} denotes a container class containing objects of type \tcode{T},
@@ -86,6 +90,8 @@
8690
\tcode{rv} denotes a non-const rvalue of type \tcode{X}.
8791
\end{itemize}
8892

93+
\rSec3[container.reqmts]{Containers}
94+
8995
\pnum
9096
A type \tcode{X} meets the \defn{container} requirements
9197
if the following types, statements, and expressions are well-formed and
@@ -584,6 +590,8 @@
584590
with value \tcode{a.end()} before the swap will have value \tcode{b.end()} after the
585591
swap.
586592

593+
\rSec3[container.rev.reqmts]{Reversible container requirements}
594+
587595
\pnum
588596
A type \tcode{X} meets the \defnadj{reversible}{container} requirements if
589597
\tcode{X} meets the container requirements,
@@ -748,6 +756,8 @@
748756
\oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} and
749757
model \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}.
750758

759+
\rSec3[container.opt.reqmts]{Optional container requirements}
760+
751761
\pnum
752762
The following operations are provided
753763
for some types of containers but not others. Those containers for which the
@@ -787,6 +797,8 @@
787797
Linear.
788798
\end{itemdescr}
789799

800+
\rSec3[container.alloc.reqmts]{Allocator-aware containers}
801+
790802
\pnum
791803
All of the containers defined in \ref{containers} and in~\ref{basic.string} except \tcode{array}
792804
meet the additional requirements of an \defnadj{allocator-aware}{container},
@@ -1993,7 +2005,7 @@
19932005
template<@\unspecnc@>
19942006
class @\placeholder{node-handle}@ {
19952007
public:
1996-
// These type declarations are described in Tables \ref{tab:container.assoc.req} and \ref{tab:container.hash.req}.
2008+
// These type declarations are described in \ref{associative.reqmts} and \ref{unord.req}.
19972009
using value_type = @\seebelownc{}@; // not present for map containers
19982010
using key_type = @\seebelownc{}@; // not present for set containers
19992011
using mapped_type = @\seebelownc{}@; // not present for set containers
@@ -2425,7 +2437,7 @@
24252437
have the specified semantics,
24262438
except that for
24272439
\tcode{map} and \tcode{multimap}, the requirements placed on \tcode{value_type}
2428-
in \tref{container.alloc.req} apply instead to \tcode{key_type}
2440+
in \ref{container.alloc.reqmts} apply instead to \tcode{key_type}
24292441
and \tcode{mapped_type}.
24302442
\begin{note}
24312443
For example, in some cases \tcode{key_type} and \tcode{mapped_type}
@@ -3846,7 +3858,7 @@
38463858
the following types, statements, and expressions are well-formed and
38473859
have the specified semantics,
38483860
except that for \tcode{unordered_map} and \tcode{unordered_multimap},
3849-
the requirements placed on \tcode{value_type} in \tref{container.alloc.req}
3861+
the requirements placed on \tcode{value_type} in \ref{container.alloc.reqmts}
38503862
apply instead to \tcode{key_type} and \tcode{mapped_type}.
38513863
\begin{note}
38523864
For example, \tcode{key_type} and \tcode{mapped_type}
@@ -5676,8 +5688,10 @@
56765688

56775689
\pnum
56785690
\indextext{requirements!container}%
5679-
An \tcode{array} meets all of the requirements of a container and
5680-
of a reversible container\iref{container.requirements}, except that a default
5691+
An \tcode{array} meets all of the requirements
5692+
of a container\iref{container.reqmts} and
5693+
of a reversible container\iref{container.rev.reqmts},
5694+
except that a default
56815695
constructed \tcode{array} object is not empty and that \tcode{swap} does not have constant
56825696
complexity. An \tcode{array} meets some of the requirements of a sequence
56835697
container\iref{sequence.reqmts}.
@@ -5991,11 +6005,12 @@
59916005
Storage management is handled automatically.
59926006

59936007
\pnum
5994-
A
5995-
\tcode{deque}
5996-
meets all of the requirements of a container, of a reversible container
5997-
(given in tables in~\ref{container.requirements}), of a sequence container,
5998-
including the optional sequence container requirements\iref{sequence.reqmts}, and of an allocator-aware container (\tref{container.alloc.req}).
6008+
A \tcode{deque} meets all of the requirements
6009+
of a container\iref{container.reqmts},
6010+
of a reversible container\iref{container.rev.reqmts},
6011+
of an allocator-aware container\iref{container.alloc.reqmts}, and
6012+
of a sequence container,
6013+
including the optional sequence container requirements\iref{sequence.reqmts}.
59996014
Descriptions are provided here only for operations on
60006015
\tcode{deque}
60016016
that are not described in one of these tables
@@ -6407,13 +6422,15 @@
64076422
\end{note}
64086423

64096424
\pnum
6410-
A \tcode{forward_list} meets all of the requirements of a container\iref{container.requirements.general}, except that the \tcode{size()}
6411-
member function is not provided and \tcode{operator==} has linear complexity.
6412-
A \tcode{forward_list} also meets all of the requirements for an allocator-aware
6413-
container (\tref{container.alloc.req}). In addition, a \tcode{forward_list}
6414-
provides the \tcode{assign} member functions
6415-
(\tref{container.seq.req}) and several of the optional
6416-
container requirements (\tref{container.seq.opt}).
6425+
A \tcode{forward_list} meets all of the requirements
6426+
of a container\iref{container.reqmts},
6427+
except that the \tcode{size()} member function is not provided and
6428+
\tcode{operator==} has linear complexity,
6429+
A \tcode{forward_list} also meets all of the requirements
6430+
for an allocator-aware container\iref{container.alloc.reqmts}.
6431+
In addition, a \tcode{forward_list}
6432+
provides the \tcode{assign} member functions and
6433+
several of the optional sequence container requirements\iref{sequence.reqmts}.
64176434
Descriptions are provided here only for operations on
64186435
\tcode{forward_list} that are not described in that table or for operations where there
64196436
is additional semantic information.
@@ -7207,12 +7224,13 @@
72077224
algorithms only need sequential access anyway.
72087225

72097226
\pnum
7210-
A \tcode{list} meets all of the requirements of a container, of
7211-
a reversible container (given in two tables in
7212-
\ref{container.requirements}), of a sequence container,
7227+
A \tcode{list} meets all of the requirements
7228+
of a container\iref{container.reqmts},
7229+
of a reversible container\iref{container.rev.reqmts},
7230+
of an allocator-aware container\iref{container.alloc.reqmts}, and
7231+
of a sequence container,
72137232
including most of the optional sequence container
7214-
requirements\iref{sequence.reqmts}, and of an allocator-aware container
7215-
(\tref{container.alloc.req}).
7233+
requirements\iref{sequence.reqmts}.
72167234
The exceptions are the
72177235
\tcode{operator[]}
72187236
and
@@ -7919,11 +7937,12 @@
79197937
to improve efficiency.
79207938

79217939
\pnum
7922-
A \tcode{vector} meets all of the requirements of a container and of a
7923-
reversible container (given in two tables in~\ref{container.requirements}), of a
7924-
sequence container, including most of the optional sequence container
7925-
requirements\iref{sequence.reqmts}, of an allocator-aware container
7926-
(\tref{container.alloc.req}),
7940+
A \tcode{vector} meets all of the requirements
7941+
of a container\iref{container.reqmts},
7942+
of a reversible container\iref{container.rev.reqmts},
7943+
of an allocator-aware container\iref{container.alloc.reqmts},
7944+
of a sequence container, including most of the optional sequence container
7945+
requirements\iref{sequence.reqmts},
79277946
and, for an element type other than \tcode{bool},
79287947
of a contiguous container\iref{container.requirements.general}.
79297948
The exceptions are the
@@ -8798,10 +8817,11 @@
87988817
on the keys. The \tcode{map} class supports bidirectional iterators.
87998818

88008819
\pnum
8801-
A
8802-
\tcode{map}
8803-
meets all of the requirements of a container, of a reversible container\iref{container.requirements}, of
8804-
an associative container\iref{associative.reqmts}, and of an allocator-aware container (\tref{container.alloc.req}).
8820+
A \tcode{map} meets all of the requirements of
8821+
a container\iref{container.reqmts},
8822+
of a reversible container\iref{container.rev.reqmts},
8823+
of an allocator-aware container\iref{container.alloc.reqmts}. and
8824+
of an associative container\iref{associative.reqmts}.
88058825
A
88068826
\tcode{map}
88078827
also provides most operations described in~\ref{associative.reqmts}
@@ -9345,11 +9365,11 @@
93459365
supports bidirectional iterators.
93469366

93479367
\pnum
9348-
A
9349-
\tcode{multimap} meets all of the requirements of a container and of a
9350-
reversible container\iref{container.requirements}, of an associative
9351-
container\iref{associative.reqmts}, and of an allocator-aware container
9352-
(\tref{container.alloc.req}).
9368+
A \tcode{multimap} meets all of the requirements
9369+
of a container\iref{container.reqmts},
9370+
of a reversible container\iref{container.rev.reqmts},
9371+
of an allocator-aware container\iref{container.alloc.reqmts}, and
9372+
of an associative container\iref{associative.reqmts}.
93539373
A
93549374
\tcode{multimap}
93559375
also provides most operations described in~\ref{associative.reqmts}
@@ -9666,10 +9686,11 @@
96669686
supports bidirectional iterators.
96679687

96689688
\pnum
9669-
A \tcode{set} meets all of the requirements of a container, of a reversible
9670-
container\iref{container.requirements}, of an associative
9671-
container\iref{associative.reqmts}, and of an allocator-aware container
9672-
(\tref{container.alloc.req}).
9689+
A \tcode{set} meets all of the requirements
9690+
of a container\iref{container.reqmts},
9691+
of a reversible container\iref{container.rev.reqmts},
9692+
of an allocator-aware container\iref{container.alloc.reqmts}. and
9693+
of an associative container\iref{associative.reqmts}.
96739694
A
96749695
\tcode{set}
96759696
also provides most operations described in~\ref{associative.reqmts}
@@ -9944,10 +9965,11 @@
99449965
supports bidirectional iterators.
99459966

99469967
\pnum
9947-
A \tcode{multiset} meets all of the requirements of a container, of a
9948-
reversible container\iref{container.requirements}, of an associative
9949-
container\iref{associative.reqmts}, and of an allocator-aware container
9950-
(\tref{container.alloc.req}).
9968+
A \tcode{multiset} meets all of the requirements
9969+
of a container\iref{container.reqmts},
9970+
of a reversible container\iref{container.rev.reqmts},
9971+
of an allocator-aware container\iref{container.alloc.reqmts},
9972+
of an associative container\iref{associative.reqmts}.
99519973
\tcode{multiset}
99529974
also provides most operations described in~\ref{associative.reqmts}
99539975
for duplicate keys.
@@ -10375,7 +10397,11 @@
1037510397
supports forward iterators.
1037610398

1037710399
\pnum
10378-
An \tcode{unordered_map} meets all of the requirements of a container, of an unordered associative container, and of an allocator-aware container (\tref{container.alloc.req}). It provides the operations described in the preceding requirements table for unique keys; that is, an \tcode{unordered_map} supports the \tcode{a_uniq} operations in that table, not the \tcode{a_eq} operations. For an \tcode{unordered_map<Key, T>} the \tcode{key type} is \tcode{Key}, the mapped type is \tcode{T}, and the value type is \tcode{pair<const Key, T>}.
10400+
An \tcode{unordered_map} meets all of the requirements
10401+
of a container\iref{container.reqmts},
10402+
of an allocator-aware container\iref{container.alloc.reqmts}, and
10403+
of an unordered associative container\iref{unord.req}.
10404+
It provides the operations described in the preceding requirements table for unique keys; that is, an \tcode{unordered_map} supports the \tcode{a_uniq} operations in that table, not the \tcode{a_eq} operations. For an \tcode{unordered_map<Key, T>} the \tcode{key type} is \tcode{Key}, the mapped type is \tcode{T}, and the value type is \tcode{pair<const Key, T>}.
1037910405

1038010406
\pnum
1038110407
Subclause~\ref{unord.map} only describes operations on \tcode{unordered_map} that
@@ -10967,9 +10993,11 @@
1096710993
supports forward iterators.
1096810994

1096910995
\pnum
10970-
An \tcode{unordered_multimap} meets all of the requirements of a container, of an
10971-
unordered associative container, and of an allocator-aware container
10972-
(\tref{container.alloc.req}). It provides the operations described in the
10996+
An \tcode{unordered_multimap} meets all of the requirements
10997+
of a container\iref{container.reqmts},
10998+
of an allocator-aware container\iref{container.alloc.reqmts}, and
10999+
of an unordered associative container\iref{unord.req}.
11000+
It provides the operations described in the
1097311001
preceding requirements table for equivalent keys; that is, an \tcode{unordered_multimap}
1097411002
supports the \tcode{a_eq} operations in that table, not the \tcode{a_uniq} operations.
1097511003
For an \tcode{unordered_multimap<Key, T>} the \tcode{key type} is \tcode{Key}, the
@@ -11343,7 +11371,11 @@
1134311371
supports forward iterators.
1134411372

1134511373
\pnum
11346-
An \tcode{unordered_set} meets all of the requirements of a container, of an unordered associative container, and of an allocator-aware container (\tref{container.alloc.req}). It provides the operations described in the preceding requirements table for unique keys; that is, an \tcode{unordered_set} supports the \tcode{a_uniq} operations in that table, not the \tcode{a_eq} operations. For an \tcode{unordered_set<Key>} the \tcode{key type} and the value type are both \tcode{Key}. The \tcode{iterator} and \tcode{const_iterator} types are both constant iterator types. It is unspecified whether they are the same type.
11374+
An \tcode{unordered_set} meets all of the requirements
11375+
of a container\iref{container.reqmts},
11376+
of an allocator-aware container\iref{container.alloc.reqmts},
11377+
of an unordered associative container\iref{unord.req}.
11378+
It provides the operations described in the preceding requirements table for unique keys; that is, an \tcode{unordered_set} supports the \tcode{a_uniq} operations in that table, not the \tcode{a_eq} operations. For an \tcode{unordered_set<Key>} the \tcode{key type} and the value type are both \tcode{Key}. The \tcode{iterator} and \tcode{const_iterator} types are both constant iterator types. It is unspecified whether they are the same type.
1134711379

1134811380
\pnum
1134911381
Subclause~\ref{unord.set} only describes operations on \tcode{unordered_set} that
@@ -11664,9 +11696,11 @@
1166411696
supports forward iterators.
1166511697

1166611698
\pnum
11667-
An \tcode{unordered_multiset} meets all of the requirements of a container, of an
11668-
unordered associative container, and of an allocator-aware container
11669-
(\tref{container.alloc.req}). It provides the operations described in the
11699+
An \tcode{unordered_multiset} meets all of the requirements
11700+
of a container\iref{container.reqmts},
11701+
of an allocator-aware container\iref{container.alloc.reqmts}, and
11702+
of an unordered associative container\iref{unord.req}.
11703+
It provides the operations described in the
1167011704
preceding requirements table for equivalent keys; that is, an \tcode{unordered_multiset}
1167111705
supports the \tcode{a_eq} operations in that table, not the \tcode{a_uniq} operations.
1167211706
For an \tcode{unordered_multiset<Key>} the \tcode{key type} and the value type are

source/strings.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@
13171317
\pnum
13181318
\effects
13191319
Constructs a string from the values in the range \range{begin}{end},
1320-
as indicated in \tref{container.seq.req}.
1320+
as specified in \ref{sequence.reqmts}.
13211321
\end{itemdescr}
13221322

13231323
\indexlibraryctor{basic_string}%

source/utilities.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22981,10 +22981,10 @@
2298122981

2298222982
\pnum
2298322983
The class template \tcode{basic_stacktrace} satisfies
22984-
the requirements of
22985-
an allocator-aware container (\tref{container.alloc.req}),
22986-
a sequence container\iref{sequence.reqmts}, and
22987-
a reversible container\iref{container.requirements.general}
22984+
the requirements
22985+
of a reversible container\iref{container.rev.reqmts},
22986+
of an allocator-aware container\iref{container.alloc.reqmts}, and
22987+
of a sequence container\iref{sequence.reqmts},
2298822988
except that
2298922989
\begin{itemize}
2299022990
\item

0 commit comments

Comments
 (0)