|
193 | 193 | linear \\ \rowsep
|
194 | 194 |
|
195 | 195 | \tcode{a.\~X()} &
|
196 |
| - \tcode{void} & |
| 196 | + \keyword{void} & |
197 | 197 | &
|
198 | 198 | \effects destroys every element of \tcode{a}; any memory obtained is deallocated. &
|
199 | 199 | linear \\ \rowsep
|
|
243 | 243 | linear \\ \rowsep
|
244 | 244 |
|
245 | 245 | \tcode{a.swap(b)} &
|
246 |
| - \tcode{void} & |
| 246 | + \keyword{void} & |
247 | 247 | &
|
248 | 248 | \effects exchanges the contents of \tcode{a} and \tcode{b} &
|
249 | 249 | (Note A) \\ \rowsep
|
250 | 250 |
|
251 | 251 | \tcode{swap(a, b)} &
|
252 |
| - \tcode{void} & |
| 252 | + \keyword{void} & |
253 | 253 | Equivalent to \tcode{a.swap(b)} &
|
254 | 254 | &
|
255 | 255 | (Note A) \\ \rowsep
|
|
732 | 732 | linear \\ \rowsep
|
733 | 733 |
|
734 | 734 | \tcode{a.swap(b)} &
|
735 |
| - \tcode{void} & |
| 735 | + \keyword{void} & |
736 | 736 | \effects exchanges the contents of \tcode{a} and \tcode{b} &
|
737 | 737 | constant \\ \rowsep
|
738 | 738 |
|
|
961 | 961 | \effects\ Erases the elements in the range \tcode{[q1, q2)}. \\ \rowsep
|
962 | 962 |
|
963 | 963 | \tcode{a.clear()} &
|
964 |
| - \tcode{void} & |
| 964 | + \keyword{void} & |
965 | 965 | \effects Destroys all elements in \tcode{a}. Invalidates all references, pointers, and
|
966 | 966 | iterators referring to the elements of \tcode{a} and may invalidate the past-the-end iterator.\br
|
967 | 967 | \ensures \tcode{a.empty()} is \tcode{true}.\br
|
968 | 968 | \complexity Linear. \\ \rowsep
|
969 | 969 |
|
970 | 970 | \tcode{a.assign(i,j)} &
|
971 |
| - \tcode{void} & |
| 971 | + \keyword{void} & |
972 | 972 | \expects \tcode{T} is \oldconcept{EmplaceConstructible} into \tcode{X} from \tcode{*i}
|
973 | 973 | and assignable from \tcode{*i}. For \tcode{vector}, if the iterator does not
|
974 | 974 | meet the forward iterator requirements\iref{forward.iterators}, \tcode{T}
|
|
984 | 984 | Each iterator in the range \range{i}{j} shall be dereferenced exactly once. \\ \rowsep
|
985 | 985 |
|
986 | 986 | \tcode{a.assign(il)} &
|
987 |
| - \tcode{void} & |
| 987 | + \keyword{void} & |
988 | 988 | \tcode{a.assign(il.begin(), il.end())}. \\ \rowsep
|
989 | 989 |
|
990 | 990 | \tcode{a.assign(n,t)} &
|
991 |
| - \tcode{void} & |
| 991 | + \keyword{void} & |
992 | 992 | \expects \tcode{T} is
|
993 | 993 | \oldconcept{CopyInsertable} into \tcode{X}
|
994 | 994 | and \oldconcept{CopyAssignable}.
|
|
1151 | 1151 | \\ \rowsep
|
1152 | 1152 |
|
1153 | 1153 | \tcode{a.push_front(t)} &
|
1154 |
| - \tcode{void} & |
| 1154 | + \keyword{void} & |
1155 | 1155 | \effects Prepends a copy of \tcode{t}.\br
|
1156 | 1156 | \expects \tcode{T} is
|
1157 | 1157 | \oldconcept{CopyInsertable} into \tcode{X}.
|
|
1162 | 1162 | \\ \rowsep
|
1163 | 1163 |
|
1164 | 1164 | \tcode{a.push_front(rv)} &
|
1165 |
| - \tcode{void} & |
| 1165 | + \keyword{void} & |
1166 | 1166 | \effects Prepends a copy of \tcode{rv}.\br
|
1167 | 1167 | \expects \tcode{T} is
|
1168 | 1168 | \oldconcept{MoveInsertable} into \tcode{X}.
|
|
1173 | 1173 | \\ \rowsep
|
1174 | 1174 |
|
1175 | 1175 | \tcode{a.push_back(t)} &
|
1176 |
| - \tcode{void} & |
| 1176 | + \keyword{void} & |
1177 | 1177 | \effects Appends a copy of \tcode{t}.\br
|
1178 | 1178 | \expects \tcode{T} is
|
1179 | 1179 | \oldconcept{CopyInsertable} into \tcode{X}.
|
|
1185 | 1185 | \\ \rowsep
|
1186 | 1186 |
|
1187 | 1187 | \tcode{a.push_back(rv)} &
|
1188 |
| - \tcode{void} & |
| 1188 | + \keyword{void} & |
1189 | 1189 | \effects Appends a copy of \tcode{rv}.\br
|
1190 | 1190 | \expects \tcode{T} is
|
1191 | 1191 | \oldconcept{MoveInsertable} into \tcode{X}.
|
|
1197 | 1197 | \\ \rowsep
|
1198 | 1198 |
|
1199 | 1199 | \tcode{a.pop_front()} &
|
1200 |
| - \tcode{void} & |
| 1200 | + \keyword{void} & |
1201 | 1201 | \effects Destroys the first element.\br
|
1202 | 1202 | \expects \tcode{a.empty()} is \tcode{false}. &
|
1203 | 1203 | \tcode{deque},
|
|
1206 | 1206 | \\ \rowsep
|
1207 | 1207 |
|
1208 | 1208 | \tcode{a.pop_back()} &
|
1209 |
| - \tcode{void} & |
| 1209 | + \keyword{void} & |
1210 | 1210 | \effects Destroys the last element.\br
|
1211 | 1211 | \expects \tcode{a.empty()} is \tcode{false}. &
|
1212 | 1212 | \tcode{basic_string},
|
|
1935 | 1935 | is inserted right before \tcode{p}. \\ \rowsep
|
1936 | 1936 |
|
1937 | 1937 | \tcode{a.\brk{}insert(\brk{}i, j)} &
|
1938 |
| - \tcode{void} & |
| 1938 | + \keyword{void} & |
1939 | 1939 | \expects \tcode{value_type} is \oldconcept{EmplaceConstructible} into \tcode{X} from \tcode{*i}.
|
1940 | 1940 | Neither \tcode{i} nor \tcode{j} are iterators into \tcode{a}.\br
|
1941 | 1941 | \effects Inserts each element from the range \range{i}{j} if and only if there
|
|
1944 | 1944 | $N \log (\tcode{a.size()} + N)$, where $N$ has the value \tcode{distance(i, j)} \\ \rowsep
|
1945 | 1945 |
|
1946 | 1946 | \tcode{a.\brk{}insert(\brk{}il)} &
|
1947 |
| - \tcode{void} & |
| 1947 | + \keyword{void} & |
1948 | 1948 | \effects
|
1949 | 1949 | Equivalent to \tcode{a.insert(il.begin(), il.end())} &
|
1950 | 1950 | \\ \rowsep
|
|
2008 | 2008 |
|
2009 | 2009 | \indexordmem{merge}%
|
2010 | 2010 | \tcode{a.merge(a2)} &
|
2011 |
| - \tcode{void} & |
| 2011 | + \keyword{void} & |
2012 | 2012 | \expects \tcode{a.get_allocator() == a2.get_allocator()}.\br
|
2013 | 2013 | \effects Attempts to extract each element in \tcode{a2} and insert it into \tcode{a}
|
2014 | 2014 | using the comparison object of \tcode{a}. In containers with unique keys,
|
|
2056 | 2056 |
|
2057 | 2057 | \indexordmem{clear}%
|
2058 | 2058 | \tcode{a.clear()} &
|
2059 |
| - \tcode{void} & |
| 2059 | + \keyword{void} & |
2060 | 2060 | \effects Equivalent to \tcode{a.erase(a.begin(), a.end())}.\br
|
2061 | 2061 | \ensures \tcode{a.empty()} is \tcode{true}. &
|
2062 | 2062 | linear in \tcode{a.size()}. \\ \rowsep
|
|
2747 | 2747 | \\ \rowsep
|
2748 | 2748 | %
|
2749 | 2749 | \tcode{a.insert(i, j)}
|
2750 |
| -& \tcode{void} |
| 2750 | +& \keyword{void} |
2751 | 2751 | & \expects \tcode{value_type} is \oldconcept{EmplaceConstructible} into \tcode{X} from \tcode{*i}.
|
2752 | 2752 | Neither \tcode{i} nor \tcode{j} are iterators into \tcode{a}.\br
|
2753 | 2753 | \effects Equivalent to \tcode{a.insert(t)} for each element in \tcode{[i,j)}.%
|
|
2756 | 2756 | \\ \rowsep
|
2757 | 2757 | %
|
2758 | 2758 | \tcode{a.insert(il)}
|
2759 |
| -& \tcode{void} |
| 2759 | +& \keyword{void} |
2760 | 2760 | & Same as \tcode{a.insert(il.begin(), il.end())}.
|
2761 | 2761 | & Same as \tcode{a.insert(} \tcode{il.begin(),} \tcode{il.end())}.
|
2762 | 2762 | \\ \rowsep
|
|
2820 | 2820 | %
|
2821 | 2821 | \indexunordmem{merge}%
|
2822 | 2822 | \tcode{a.merge(a2)} &
|
2823 |
| - \tcode{void} & |
| 2823 | + \keyword{void} & |
2824 | 2824 | \expects \tcode{a.get_allocator() == a2.get_allocator()}.\br
|
2825 | 2825 | Attempts to extract each element in \tcode{a2} and insert it into \tcode{a}
|
2826 | 2826 | using the hash function and key equality predicate of \tcode{a}.
|
|
2869 | 2869 | %
|
2870 | 2870 | \indexunordmem{clear}%
|
2871 | 2871 | \tcode{a.clear()}
|
2872 |
| -& \tcode{void} |
| 2872 | +& \keyword{void} |
2873 | 2873 | & \effects Erases all elements in the container.\br
|
2874 | 2874 | \ensures \tcode{a.empty()} is \tcode{true}%
|
2875 | 2875 | & Linear in \tcode{a.size()}.
|
|
3034 | 3034 | \\ \rowsep
|
3035 | 3035 | %
|
3036 | 3036 | \tcode{a.max_load_factor(z)}
|
3037 |
| -& \tcode{void} |
| 3037 | +& \keyword{void} |
3038 | 3038 | & \expects \tcode{z} is positive.
|
3039 | 3039 | May change the container's maximum load factor, using \tcode{z} as a hint.%
|
3040 | 3040 | & Constant
|
3041 | 3041 | \\ \rowsep
|
3042 | 3042 | %
|
3043 | 3043 | \indexunordmem{rehash}%
|
3044 | 3044 | \tcode{a.rehash(n)}
|
3045 |
| -& \tcode{void} |
| 3045 | +& \keyword{void} |
3046 | 3046 | & \ensures \tcode{a.bucket_count() >= a.size() / a.max_load_factor()} and
|
3047 | 3047 | \tcode{a.bucket_count() >= n}.%
|
3048 | 3048 | & Average case linear in \tcode{a.size()}, worst case quadratic.
|
3049 | 3049 | \\ \rowsep
|
3050 | 3050 |
|
3051 | 3051 | \indexunordmem{reserve}%
|
3052 | 3052 | \tcode{a.reserve(n)} &
|
3053 |
| - \tcode{void} & |
| 3053 | + \keyword{void} & |
3054 | 3054 | Same as \tcode{a.rehash(ceil(n /} \tcode{a.max_load_factor()))}. &
|
3055 | 3055 | Average case linear in \tcode{a.size()}, worst case quadratic. \\
|
3056 | 3056 |
|
|
0 commit comments