Skip to content

Commit 9f1b3f4

Browse files
committed
[lib] Fix cross-references to container requirements tables
1 parent 83ac35b commit 9f1b3f4

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
% Local command to index names as members of all containers.
9096
\newcommand{\indexcont}[1]{%
9197
\indexlibrarymisc{#1}{containers}%
@@ -620,6 +626,8 @@
620626
with value \tcode{a.end()} before the swap will have value \tcode{b.end()} after the
621627
swap.
622628

629+
\rSec3[container.rev.reqmts]{Reversible container requirements}
630+
623631
% Local command to index names as members of all containers.
624632
\renewcommand{\indexcont}[1]{%
625633
\indexlibrarymisc{#1}{reversible containers}%
@@ -807,6 +815,8 @@
807815
\oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} and
808816
model \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}.
809817

818+
\rSec3[container.opt.reqmts]{Optional container requirements}
819+
810820
\pnum
811821
The following operations are provided
812822
for some types of containers but not others. Those containers for which the
@@ -846,6 +856,8 @@
846856
Linear.
847857
\end{itemdescr}
848858

859+
\rSec3[container.alloc.reqmts]{Allocator-aware containers}
860+
849861
\pnum
850862
All of the containers defined in \ref{containers} and in~\ref{basic.string} except \tcode{array}
851863
meet the additional requirements of an \defnadj{allocator-aware}{container},
@@ -2087,7 +2099,7 @@
20872099
template<@\unspecnc@>
20882100
class @\placeholder{node-handle}@ {
20892101
public:
2090-
// These type declarations are described in Tables \ref{tab:container.assoc.req} and \ref{tab:container.hash.req}.
2102+
// These type declarations are described in \ref{associative.reqmts} and \ref{unord.req}.
20912103
using value_type = @\seebelownc{}@; // not present for map containers
20922104
using key_type = @\seebelownc{}@; // not present for set containers
20932105
using mapped_type = @\seebelownc{}@; // not present for set containers
@@ -2522,7 +2534,7 @@
25222534
have the specified semantics,
25232535
except that for
25242536
\tcode{map} and \tcode{multimap}, the requirements placed on \tcode{value_type}
2525-
in \tref{container.alloc.req} apply instead to \tcode{key_type}
2537+
in \ref{container.alloc.reqmts} apply instead to \tcode{key_type}
25262538
and \tcode{mapped_type}.
25272539
\begin{note}
25282540
For example, in some cases \tcode{key_type} and \tcode{mapped_type}
@@ -3943,7 +3955,7 @@
39433955
the following types, statements, and expressions are well-formed and
39443956
have the specified semantics,
39453957
except that for \tcode{unordered_map} and \tcode{unordered_multimap},
3946-
the requirements placed on \tcode{value_type} in \tref{container.alloc.req}
3958+
the requirements placed on \tcode{value_type} in \ref{container.alloc.reqmts}
39473959
apply instead to \tcode{key_type} and \tcode{mapped_type}.
39483960
\begin{note}
39493961
For example, \tcode{key_type} and \tcode{mapped_type}
@@ -5773,8 +5785,10 @@
57735785

57745786
\pnum
57755787
\indextext{requirements!container}%
5776-
An \tcode{array} meets all of the requirements of a container and
5777-
of a reversible container\iref{container.requirements}, except that a default
5788+
An \tcode{array} meets all of the requirements
5789+
of a container\iref{container.reqmts} and
5790+
of a reversible container\iref{container.rev.reqmts},
5791+
except that a default
57785792
constructed \tcode{array} object is not empty and that \tcode{swap} does not have constant
57795793
complexity. An \tcode{array} meets some of the requirements of a sequence
57805794
container\iref{sequence.reqmts}.
@@ -6088,11 +6102,12 @@
60886102
Storage management is handled automatically.
60896103

60906104
\pnum
6091-
A
6092-
\tcode{deque}
6093-
meets all of the requirements of a container, of a reversible container
6094-
(given in tables in~\ref{container.requirements}), of a sequence container,
6095-
including the optional sequence container requirements\iref{sequence.reqmts}, and of an allocator-aware container (\tref{container.alloc.req}).
6105+
A \tcode{deque} meets all of the requirements
6106+
of a container\iref{container.reqmts},
6107+
of a reversible container\iref{container.rev.reqmts},
6108+
of an allocator-aware container\iref{container.alloc.reqmts}, and
6109+
of a sequence container,
6110+
including the optional sequence container requirements\iref{sequence.reqmts}.
60966111
Descriptions are provided here only for operations on
60976112
\tcode{deque}
60986113
that are not described in one of these tables
@@ -6504,13 +6519,15 @@
65046519
\end{note}
65056520

65066521
\pnum
6507-
A \tcode{forward_list} meets all of the requirements of a container\iref{container.requirements.general}, except that the \tcode{size()}
6508-
member function is not provided and \tcode{operator==} has linear complexity.
6509-
A \tcode{forward_list} also meets all of the requirements for an allocator-aware
6510-
container (\tref{container.alloc.req}). In addition, a \tcode{forward_list}
6511-
provides the \tcode{assign} member functions
6512-
(\tref{container.seq.req}) and several of the optional
6513-
container requirements (\tref{container.seq.opt}).
6522+
A \tcode{forward_list} meets all of the requirements
6523+
of a container\iref{container.reqmts},
6524+
except that the \tcode{size()} member function is not provided and
6525+
\tcode{operator==} has linear complexity,
6526+
A \tcode{forward_list} also meets all of the requirements
6527+
for an allocator-aware container\iref{container.alloc.reqmts}.
6528+
In addition, a \tcode{forward_list}
6529+
provides the \tcode{assign} member functions and
6530+
several of the optional sequence container requirements\iref{sequence.reqmts}.
65146531
Descriptions are provided here only for operations on
65156532
\tcode{forward_list} that are not described in that table or for operations where there
65166533
is additional semantic information.
@@ -7304,12 +7321,13 @@
73047321
algorithms only need sequential access anyway.
73057322

73067323
\pnum
7307-
A \tcode{list} meets all of the requirements of a container, of
7308-
a reversible container (given in two tables in
7309-
\ref{container.requirements}), of a sequence container,
7324+
A \tcode{list} meets all of the requirements
7325+
of a container\iref{container.reqmts},
7326+
of a reversible container\iref{container.rev.reqmts},
7327+
of an allocator-aware container\iref{container.alloc.reqmts}, and
7328+
of a sequence container,
73107329
including most of the optional sequence container
7311-
requirements\iref{sequence.reqmts}, and of an allocator-aware container
7312-
(\tref{container.alloc.req}).
7330+
requirements\iref{sequence.reqmts}.
73137331
The exceptions are the
73147332
\tcode{operator[]}
73157333
and
@@ -8016,11 +8034,12 @@
80168034
to improve efficiency.
80178035

80188036
\pnum
8019-
A \tcode{vector} meets all of the requirements of a container and of a
8020-
reversible container (given in two tables in~\ref{container.requirements}), of a
8021-
sequence container, including most of the optional sequence container
8022-
requirements\iref{sequence.reqmts}, of an allocator-aware container
8023-
(\tref{container.alloc.req}),
8037+
A \tcode{vector} meets all of the requirements
8038+
of a container\iref{container.reqmts},
8039+
of a reversible container\iref{container.rev.reqmts},
8040+
of an allocator-aware container\iref{container.alloc.reqmts},
8041+
of a sequence container, including most of the optional sequence container
8042+
requirements\iref{sequence.reqmts},
80248043
and, for an element type other than \tcode{bool},
80258044
of a contiguous container\iref{container.requirements.general}.
80268045
The exceptions are the
@@ -8895,10 +8914,11 @@
88958914
on the keys. The \tcode{map} class supports bidirectional iterators.
88968915

88978916
\pnum
8898-
A
8899-
\tcode{map}
8900-
meets all of the requirements of a container, of a reversible container\iref{container.requirements}, of
8901-
an associative container\iref{associative.reqmts}, and of an allocator-aware container (\tref{container.alloc.req}).
8917+
A \tcode{map} meets all of the requirements of
8918+
a container\iref{container.reqmts},
8919+
of a reversible container\iref{container.rev.reqmts},
8920+
of an allocator-aware container\iref{container.alloc.reqmts}. and
8921+
of an associative container\iref{associative.reqmts}.
89028922
A
89038923
\tcode{map}
89048924
also provides most operations described in~\ref{associative.reqmts}
@@ -9442,11 +9462,11 @@
94429462
supports bidirectional iterators.
94439463

94449464
\pnum
9445-
A
9446-
\tcode{multimap} meets all of the requirements of a container and of a
9447-
reversible container\iref{container.requirements}, of an associative
9448-
container\iref{associative.reqmts}, and of an allocator-aware container
9449-
(\tref{container.alloc.req}).
9465+
A \tcode{multimap} meets all of the requirements
9466+
of a container\iref{container.reqmts},
9467+
of a reversible container\iref{container.rev.reqmts},
9468+
of an allocator-aware container\iref{container.alloc.reqmts}, and
9469+
of an associative container\iref{associative.reqmts}.
94509470
A
94519471
\tcode{multimap}
94529472
also provides most operations described in~\ref{associative.reqmts}
@@ -9763,10 +9783,11 @@
97639783
supports bidirectional iterators.
97649784

97659785
\pnum
9766-
A \tcode{set} meets all of the requirements of a container, of a reversible
9767-
container\iref{container.requirements}, of an associative
9768-
container\iref{associative.reqmts}, and of an allocator-aware container
9769-
(\tref{container.alloc.req}).
9786+
A \tcode{set} meets all of the requirements
9787+
of a container\iref{container.reqmts},
9788+
of a reversible container\iref{container.rev.reqmts},
9789+
of an allocator-aware container\iref{container.alloc.reqmts}. and
9790+
of an associative container\iref{associative.reqmts}.
97709791
A
97719792
\tcode{set}
97729793
also provides most operations described in~\ref{associative.reqmts}
@@ -10041,10 +10062,11 @@
1004110062
supports bidirectional iterators.
1004210063

1004310064
\pnum
10044-
A \tcode{multiset} meets all of the requirements of a container, of a
10045-
reversible container\iref{container.requirements}, of an associative
10046-
container\iref{associative.reqmts}, and of an allocator-aware container
10047-
(\tref{container.alloc.req}).
10065+
A \tcode{multiset} meets all of the requirements
10066+
of a container\iref{container.reqmts},
10067+
of a reversible container\iref{container.rev.reqmts},
10068+
of an allocator-aware container\iref{container.alloc.reqmts},
10069+
of an associative container\iref{associative.reqmts}.
1004810070
\tcode{multiset}
1004910071
also provides most operations described in~\ref{associative.reqmts}
1005010072
for duplicate keys.
@@ -10472,7 +10494,11 @@
1047210494
supports forward iterators.
1047310495

1047410496
\pnum
10475-
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>}.
10497+
An \tcode{unordered_map} meets all of the requirements
10498+
of a container\iref{container.reqmts},
10499+
of an allocator-aware container\iref{container.alloc.reqmts}, and
10500+
of an unordered associative container\iref{unord.req}.
10501+
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>}.
1047610502

1047710503
\pnum
1047810504
Subclause~\ref{unord.map} only describes operations on \tcode{unordered_map} that
@@ -11064,9 +11090,11 @@
1106411090
supports forward iterators.
1106511091

1106611092
\pnum
11067-
An \tcode{unordered_multimap} meets all of the requirements of a container, of an
11068-
unordered associative container, and of an allocator-aware container
11069-
(\tref{container.alloc.req}). It provides the operations described in the
11093+
An \tcode{unordered_multimap} meets all of the requirements
11094+
of a container\iref{container.reqmts},
11095+
of an allocator-aware container\iref{container.alloc.reqmts}, and
11096+
of an unordered associative container\iref{unord.req}.
11097+
It provides the operations described in the
1107011098
preceding requirements table for equivalent keys; that is, an \tcode{unordered_multimap}
1107111099
supports the \tcode{a_eq} operations in that table, not the \tcode{a_uniq} operations.
1107211100
For an \tcode{unordered_multimap<Key, T>} the \tcode{key type} is \tcode{Key}, the
@@ -11440,7 +11468,11 @@
1144011468
supports forward iterators.
1144111469

1144211470
\pnum
11443-
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.
11471+
An \tcode{unordered_set} meets all of the requirements
11472+
of a container\iref{container.reqmts},
11473+
of an allocator-aware container\iref{container.alloc.reqmts},
11474+
of an unordered associative container\iref{unord.req}.
11475+
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.
1144411476

1144511477
\pnum
1144611478
Subclause~\ref{unord.set} only describes operations on \tcode{unordered_set} that
@@ -11761,9 +11793,11 @@
1176111793
supports forward iterators.
1176211794

1176311795
\pnum
11764-
An \tcode{unordered_multiset} meets all of the requirements of a container, of an
11765-
unordered associative container, and of an allocator-aware container
11766-
(\tref{container.alloc.req}). It provides the operations described in the
11796+
An \tcode{unordered_multiset} meets all of the requirements
11797+
of a container\iref{container.reqmts},
11798+
of an allocator-aware container\iref{container.alloc.reqmts}, and
11799+
of an unordered associative container\iref{unord.req}.
11800+
It provides the operations described in the
1176711801
preceding requirements table for equivalent keys; that is, an \tcode{unordered_multiset}
1176811802
supports the \tcode{a_eq} operations in that table, not the \tcode{a_uniq} operations.
1176911803
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
@@ -22986,10 +22986,10 @@
2298622986

2298722987
\pnum
2298822988
The class template \tcode{basic_stacktrace} satisfies
22989-
the requirements of
22990-
an allocator-aware container (\tref{container.alloc.req}),
22991-
a sequence container\iref{sequence.reqmts}, and
22992-
a reversible container\iref{container.requirements.general}
22989+
the requirements
22990+
of a reversible container\iref{container.rev.reqmts},
22991+
of an allocator-aware container\iref{container.alloc.reqmts}, and
22992+
of a sequence container\iref{sequence.reqmts},
2299322993
except that
2299422994
\begin{itemize}
2299522995
\item

0 commit comments

Comments
 (0)