1 |
20 |
jlechner |
|
2 |
|
|
Completion Checklist for the Standard C++ Library
|
3 |
|
|
Updated: 2003-04-25
|
4 |
|
|
|
5 |
|
|
Status Code Legend:
|
6 |
|
|
M - Missing
|
7 |
|
|
S - Present as stub.
|
8 |
|
|
X - Partially implemented, or buggy.
|
9 |
|
|
T - Implemented, pending test/inspection.
|
10 |
|
|
V - Verified to pass all available test suites.
|
11 |
|
|
Q - Qualified by inspection for non-testable correctness.
|
12 |
|
|
P - Portability verified.
|
13 |
|
|
C - Certified.
|
14 |
|
|
|
15 |
|
|
Lexical notes:
|
16 |
|
|
Only status codes appear in column 0. Notes relating to conformance
|
17 |
|
|
issues appear [in brackets].
|
18 |
|
|
|
19 |
|
|
Note that this checklist does not (yet) include all emendations
|
20 |
|
|
recommended by the ISO Library Working Group:
|
21 |
|
|
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-toc.html
|
22 |
|
|
|
23 |
|
|
Detailed explanation of status codes:
|
24 |
|
|
|
25 |
|
|
M - Missing: The name is not visible to programs that include
|
26 |
|
|
the specified header, either at compile or link stage.
|
27 |
|
|
|
28 |
|
|
S - Present as stub: A program can use the name, but no implementation
|
29 |
|
|
is provided. Programs that use the name link correctly, but
|
30 |
|
|
cannot usefully be run.
|
31 |
|
|
|
32 |
|
|
X - Partially implemented, or buggy: Some implementation has been
|
33 |
|
|
provided, but it is known or believed not to conform fully.
|
34 |
|
|
It may have an incorrect base class, wrong namespace, wrong
|
35 |
|
|
storage class, or simply not fully implement requirements.
|
36 |
|
|
However, it may be sufficiently usable to help test other
|
37 |
|
|
components.
|
38 |
|
|
|
39 |
|
|
T - Implemented, pending test/inspection: Implementation believed
|
40 |
|
|
to be complete, and informal testing suggests it is ready for
|
41 |
|
|
formal verification.
|
42 |
|
|
|
43 |
|
|
V - Verified, passes all test suites: Verified to satisfy all
|
44 |
|
|
generically testable conformance requirements.
|
45 |
|
|
|
46 |
|
|
Q - Qualified by inspection for non-testable correctness:
|
47 |
|
|
Inspected, "implementation-defined" documentation accepted,
|
48 |
|
|
local usability criteria satisfied, formally inspected for
|
49 |
|
|
other untestable conformance. (Untestable requirements
|
50 |
|
|
include exception-safety, thread-safety, worst-case
|
51 |
|
|
complexity, memory cleanliness, usefulness.)
|
52 |
|
|
|
53 |
|
|
P - Portability verified: Qualified on all primary target platforms.
|
54 |
|
|
|
55 |
|
|
C - Certified: Formally certified to have passed all tests,
|
56 |
|
|
inspections, qualifications; approved under "signing authority"
|
57 |
|
|
to be used to satisfy contractual guarantees.
|
58 |
|
|
|
59 |
|
|
----------------------------------------------------------------------
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
X
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
[C header names must be in std:: to qualify. Related to shadow/ dir.]
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
X
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
Macro:
|
75 |
|
|
X errno, declared or defined in .
|
76 |
|
|
|
77 |
|
|
Macro fn:
|
78 |
|
|
X setjmp(jmp_buf), declared or defined in
|
79 |
|
|
X va_end(va_list), declared or defined in
|
80 |
|
|
|
81 |
|
|
Types:
|
82 |
|
|
X clock_t, div_t, FILE, fpos_t, lconv, ldiv_t, mbstate_t,
|
83 |
|
|
X ptrdiff_t, sig_atomic_t, size_t, time_t, tm, va_list,
|
84 |
|
|
X wctrans_t, wctype_t, and wint_t.
|
85 |
|
|
|
86 |
|
|
1 Which of the functions in the C++ Standard Library are not reentrant
|
87 |
|
|
subroutines is implementation-defined.
|
88 |
|
|
|
89 |
|
|
18.1 Types [lib.support.types]
|
90 |
|
|
X
|
91 |
|
|
X NULL
|
92 |
|
|
X offsetof
|
93 |
|
|
X ptrdiff_t
|
94 |
|
|
X size_t
|
95 |
|
|
|
96 |
|
|
18.2 Implementation properties [lib.support.limits]
|
97 |
|
|
|
98 |
|
|
, , and
|
99 |
|
|
|
100 |
|
|
18.2.1 Numeric limits [lib.limits]
|
101 |
|
|
|
102 |
|
|
X template class numeric_limits;
|
103 |
|
|
|
104 |
|
|
T enum float_round_style;
|
105 |
|
|
T enum float_denorm_style;
|
106 |
|
|
|
107 |
|
|
T template<> class numeric_limits;
|
108 |
|
|
|
109 |
|
|
T template<> class numeric_limits;
|
110 |
|
|
T template<> class numeric_limits;
|
111 |
|
|
T template<> class numeric_limits;
|
112 |
|
|
T template<> class numeric_limits;
|
113 |
|
|
|
114 |
|
|
T template<> class numeric_limits;
|
115 |
|
|
T template<> class numeric_limits;
|
116 |
|
|
T template<> class numeric_limits;
|
117 |
|
|
T template<> class numeric_limits;
|
118 |
|
|
T template<> class numeric_limits;
|
119 |
|
|
T template<> class numeric_limits;
|
120 |
|
|
|
121 |
|
|
X template<> class numeric_limits;
|
122 |
|
|
X template<> class numeric_limits;
|
123 |
|
|
X template<> class numeric_limits;
|
124 |
|
|
|
125 |
|
|
18.2.1.1 Template class numeric_limits [lib.numeric.limits]
|
126 |
|
|
T template class numeric_limits {
|
127 |
|
|
public:
|
128 |
|
|
T static const bool is_specialized = false;
|
129 |
|
|
T static T min() throw();
|
130 |
|
|
T static T max() throw();
|
131 |
|
|
T static const int digits = 0;
|
132 |
|
|
T static const int digits10 = 0;
|
133 |
|
|
T static const bool is_signed = false;
|
134 |
|
|
T static const bool is_integer = false;
|
135 |
|
|
T static const bool is_exact = false;
|
136 |
|
|
T static const int radix = 0;
|
137 |
|
|
T static T epsilon() throw();
|
138 |
|
|
T static T round_error() throw();
|
139 |
|
|
|
140 |
|
|
T static const int min_exponent = 0;
|
141 |
|
|
T static const int min_exponent10 = 0;
|
142 |
|
|
T static const int max_exponent = 0;
|
143 |
|
|
T static const int max_exponent10 = 0;
|
144 |
|
|
|
145 |
|
|
T static const bool has_infinity = false;
|
146 |
|
|
T static const bool has_quiet_NaN = false;
|
147 |
|
|
T static const bool has_signaling_NaN = false;
|
148 |
|
|
T static const float_denorm_style has_denorm = denorm_absent;
|
149 |
|
|
T static const bool has_denorm_loss = false;
|
150 |
|
|
T static T infinity() throw();
|
151 |
|
|
T static T quiet_NaN() throw();
|
152 |
|
|
T static T signaling_NaN() throw();
|
153 |
|
|
T static T denorm_min() throw();
|
154 |
|
|
|
155 |
|
|
T static const bool is_iec559 = false;
|
156 |
|
|
T static const bool is_bounded = false;
|
157 |
|
|
T static const bool is_modulo = false;
|
158 |
|
|
|
159 |
|
|
T static const bool traps = false;
|
160 |
|
|
T static const bool tinyness_before = false;
|
161 |
|
|
T static const float_round_style round_style = round_toward_zero;
|
162 |
|
|
};
|
163 |
|
|
|
164 |
|
|
18.2.1.3 Type float_round_style [lib.round.style]
|
165 |
|
|
|
166 |
|
|
T enum float_round_style {
|
167 |
|
|
T round_indeterminate = -1,
|
168 |
|
|
T round_toward_zero = 0,
|
169 |
|
|
T round_to_nearest = 1,
|
170 |
|
|
T round_toward_infinity = 2,
|
171 |
|
|
T round_toward_neg_infinity = 3
|
172 |
|
|
};
|
173 |
|
|
|
174 |
|
|
18.2.1.4 Type float_denorm_style [lib.denorm.style]
|
175 |
|
|
|
176 |
|
|
T enum float_denorm_style {
|
177 |
|
|
T denorm_indeterminate = -1;
|
178 |
|
|
T denorm_absent = 0;
|
179 |
|
|
T denorm present = 1;
|
180 |
|
|
};
|
181 |
|
|
|
182 |
|
|
18.2.1.5 numeric_limits specializations [lib.numeric.special]
|
183 |
|
|
|
184 |
|
|
[Note: see Note at 18.2.1. ]
|
185 |
|
|
|
186 |
|
|
18.2.2 C Library [lib.c.limits]
|
187 |
|
|
|
188 |
|
|
1 Header (Table 3):
|
189 |
|
|
CHAR_BIT INT_MAX LONG_MIN SCHAR_MIN UCHAR_MAX USHRT_MAX
|
190 |
|
|
X CHAR_MAX INT_MIN MB_LEN_MAX SHRT_MAX UINT_MAX
|
191 |
|
|
CHAR_MIN LONG_MAX SCHAR_MAX SHRT_MIN ULONG_MAX
|
192 |
|
|
|
193 |
|
|
3 Header (Table 4):
|
194 |
|
|
|
195 |
|
|
DBL_DIG DBL_MIN_EXP FLT_MIN_10_EXP LDBL_MAX_10_EXP
|
196 |
|
|
DBL_EPSILON FLT_DIG FLT_MIN_EXP LDBL_MAX_EXP
|
197 |
|
|
DBL_MANT_DIG FLT_EPSILON FLT_RADIX LDBL_MIN
|
198 |
|
|
X DBL_MAX FLT_MANT_DIG FLT_ROUNDS LDBL_MIN_10_EXP
|
199 |
|
|
DBL_MAX_10_EXP FLT_MAX LDBL_DIG LDBL_MIN_EXP
|
200 |
|
|
DBL_MAX_EXP FLT_MAX_10_EXP LDBL_EPSILON
|
201 |
|
|
DBL_MIN FLT_MAX_EXP LDBL_MANT_DIG
|
202 |
|
|
DBL_MIN_10_EXP FLT_MIN LDBL_MAX
|
203 |
|
|
|
204 |
|
|
|
205 |
|
|
1 Header (partial), Table 5:
|
206 |
|
|
X EXIT_FAILURE EXIT_SUCCESS
|
207 |
|
|
abort atexit exit
|
208 |
|
|
|
209 |
|
|
S abort(void)
|
210 |
|
|
S extern "C" int atexit(void (*f)(void))
|
211 |
|
|
S extern "C++" int atexit(void (*f)(void))
|
212 |
|
|
S exit(int status)
|
213 |
|
|
|
214 |
|
|
18.4 Dynamic memory management [lib.support.dynamic]
|
215 |
|
|
|
216 |
|
|
Header synopsis
|
217 |
|
|
|
218 |
|
|
T class bad_alloc;
|
219 |
|
|
T struct nothrow_t {};
|
220 |
|
|
T extern const nothrow_t nothrow;
|
221 |
|
|
T typedef void (*new_handler)();
|
222 |
|
|
T new_handler set_new_handler(new_handler new_p) throw();
|
223 |
|
|
|
224 |
|
|
T void* operator new(std::size_t size) throw(std::bad_alloc);
|
225 |
|
|
T void* operator new(std::size_t size, const std::nothrow_t&) throw();
|
226 |
|
|
T void operator delete(void* ptr) throw();
|
227 |
|
|
T void operator delete(void* ptr, const std::nothrow_t&) throw();
|
228 |
|
|
T void* operator new[](std::size_t size) throw(std::bad_alloc);
|
229 |
|
|
T void* operator new[](std::size_t size, const std::nothrow_t&) throw();
|
230 |
|
|
T void operator delete[](void* ptr) throw();
|
231 |
|
|
T void operator delete[](void* ptr, const std::nothrow_t&) throw();
|
232 |
|
|
T void* operator new (std::size_t size, void* ptr) throw();
|
233 |
|
|
T void* operator new[](std::size_t size, void* ptr) throw();
|
234 |
|
|
T void operator delete (void* ptr, void*) throw();
|
235 |
|
|
T void operator delete[](void* ptr, void*) throw();
|
236 |
|
|
|
237 |
|
|
18.4.2.1 Class bad_alloc [lib.bad.alloc]
|
238 |
|
|
|
239 |
|
|
T class bad_alloc : public exception {
|
240 |
|
|
public:
|
241 |
|
|
T bad_alloc() throw();
|
242 |
|
|
T bad_alloc(const bad_alloc&) throw();
|
243 |
|
|
T bad_alloc& operator=(const bad_alloc&) throw();
|
244 |
|
|
T virtual ~bad_alloc() throw();
|
245 |
|
|
T virtual const char* what() const throw();
|
246 |
|
|
|
247 |
|
|
|
248 |
|
|
|
249 |
|
|
T new_handler set_new_handler(new_handler new_p) throw();
|
250 |
|
|
|
251 |
|
|
|
252 |
|
|
Header synopsis
|
253 |
|
|
|
254 |
|
|
T class type_info;
|
255 |
|
|
T class bad_cast;
|
256 |
|
|
T class bad_typeid;
|
257 |
|
|
|
258 |
|
|
18.5.1 - Class type_info [lib.type.info]
|
259 |
|
|
|
260 |
|
|
T class type_info {
|
261 |
|
|
public:
|
262 |
|
|
T virtual ~type_info();
|
263 |
|
|
T bool operator==(const type_info& rhs) const;
|
264 |
|
|
T bool operator!=(const type_info& rhs) const;
|
265 |
|
|
T bool before(const type_info& rhs) const;
|
266 |
|
|
T const char* name() const;
|
267 |
|
|
private:
|
268 |
|
|
T type_info(const type_info& rhs);
|
269 |
|
|
T type_info& operator=(const type_info& rhs);
|
270 |
|
|
};
|
271 |
|
|
|
272 |
|
|
18.5.2 - Class bad_cast [lib.bad.cast]
|
273 |
|
|
|
274 |
|
|
T bad_cast() throw();
|
275 |
|
|
T virtual const char* bad_cast::what() const throw();
|
276 |
|
|
|
277 |
|
|
18.5.3 Class bad_typeid [lib.bad.typeid]
|
278 |
|
|
|
279 |
|
|
T class bad_typeid : public exception {
|
280 |
|
|
public:
|
281 |
|
|
T bad_typeid() throw();
|
282 |
|
|
T bad_typeid(const bad_typeid&) throw();
|
283 |
|
|
T bad_typeid& operator=(const bad_typeid&) throw();
|
284 |
|
|
T virtual ~bad_typeid() throw();
|
285 |
|
|
T virtual const char* what() const throw();
|
286 |
|
|
};
|
287 |
|
|
|
288 |
|
|
18.6 Exception handling [lib.support.exception]
|
289 |
|
|
|
290 |
|
|
T Header synopsis
|
291 |
|
|
|
292 |
|
|
T class exception;
|
293 |
|
|
T class bad_exception;
|
294 |
|
|
|
295 |
|
|
T typedef void (*unexpected_handler)();
|
296 |
|
|
T unexpected_handler set_unexpected(unexpected_handler f) throw();
|
297 |
|
|
T void unexpected();
|
298 |
|
|
T typedef void (*terminate_handler)();
|
299 |
|
|
T terminate_handler set_terminate(terminate_handler f) throw();
|
300 |
|
|
T void terminate();
|
301 |
|
|
T bool uncaught_exception();
|
302 |
|
|
|
303 |
|
|
18.6.1 Class exception [lib.exception]
|
304 |
|
|
|
305 |
|
|
T class exception {
|
306 |
|
|
public:
|
307 |
|
|
T exception() throw();
|
308 |
|
|
T exception(const exception&) throw();
|
309 |
|
|
T exception& operator=(const exception&) throw();
|
310 |
|
|
T virtual ~exception() throw();
|
311 |
|
|
T virtual const char* what() const throw();
|
312 |
|
|
};
|
313 |
|
|
|
314 |
|
|
18.6.2.1 Class bad_exception [lib.bad.exception]
|
315 |
|
|
T class bad_exception : public exception {
|
316 |
|
|
public:
|
317 |
|
|
T bad_exception() throw();
|
318 |
|
|
T bad_exception(const bad_exception&) throw();
|
319 |
|
|
T bad_exception& operator=(const bad_exception&) throw();
|
320 |
|
|
T virtual ~bad_exception() throw();
|
321 |
|
|
T virtual const char* what() const throw();
|
322 |
|
|
};
|
323 |
|
|
|
324 |
|
|
18.7 Other runtime support [lib.support.runtime]
|
325 |
|
|
|
326 |
|
|
1 Headers (variable arguments), (nonlocal jumps),
|
327 |
|
|
(system clock clock(), time()), (signal handling),
|
328 |
|
|
and (runtime environment getenv(), system()).
|
329 |
|
|
|
330 |
|
|
Table 6--Header synopsis
|
331 |
|
|
Macros: va_arg va_end va_start
|
332 |
|
|
X Type: va_list
|
333 |
|
|
|
334 |
|
|
Table 7--Header synopsis
|
335 |
|
|
|
336 |
|
|
Macro: setjmp |
|
337 |
|
|
X Type: jmp_buf
|
338 |
|
|
Function: longjmp
|
339 |
|
|
|
340 |
|
|
Table 8--Header synopsis
|
341 |
|
|
|
342 |
|
|
Macros: CLOCKS_PER_SEC
|
343 |
|
|
X Types: clock_t
|
344 |
|
|
Functions: clock
|
345 |
|
|
|
346 |
|
|
Table 9--Header synopsis
|
347 |
|
|
|
348 |
|
|
X Macros: SIGABRT SIGILL SIGSEGV SIG_DFL
|
349 |
|
|
SIG_IGN SIGFPE SIGINT SIGTERM SIG_ERR
|
350 |
|
|
Type: sig_atomic_t
|
351 |
|
|
Functions: raise signal
|
352 |
|
|
|
353 |
|
|
Table 10--Header synopsis
|
354 |
|
|
|
355 |
|
|
X Functions: getenv system
|
356 |
|
|
|
357 |
|
|
19.1 Exception classes [lib.std.exceptions]
|
358 |
|
|
|
359 |
|
|
Header synopsis
|
360 |
|
|
|
361 |
|
|
T class logic_error;
|
362 |
|
|
T class domain_error;
|
363 |
|
|
T class invalid_argument;
|
364 |
|
|
T class length_error;
|
365 |
|
|
T class out_of_range;
|
366 |
|
|
T class runtime_error;
|
367 |
|
|
T class range_error;
|
368 |
|
|
T class overflow_error;
|
369 |
|
|
T class underflow_error;
|
370 |
|
|
|
371 |
|
|
19.1.1 Class logic_error [lib.logic.error]
|
372 |
|
|
T class logic_error : public exception {
|
373 |
|
|
public:
|
374 |
|
|
T explicit logic_error(const string& what_arg);
|
375 |
|
|
};
|
376 |
|
|
|
377 |
|
|
19.1.2 Class domain_error [lib.domain.error]
|
378 |
|
|
|
379 |
|
|
T class domain_error : public logic_error {
|
380 |
|
|
public:
|
381 |
|
|
T explicit domain_error(const string& what_arg);
|
382 |
|
|
};
|
383 |
|
|
|
384 |
|
|
19.1.3 Class invalid_argument [lib.invalid.argument]
|
385 |
|
|
|
386 |
|
|
T class invalid_argument : public logic_error {
|
387 |
|
|
public:
|
388 |
|
|
T explicit invalid_argument(const string& what_arg);
|
389 |
|
|
};
|
390 |
|
|
|
391 |
|
|
19.1.4 Class length_error [lib.length.error]
|
392 |
|
|
|
393 |
|
|
T class length_error : public logic_error {
|
394 |
|
|
public:
|
395 |
|
|
T explicit length_error(const string& what_arg);
|
396 |
|
|
};
|
397 |
|
|
|
398 |
|
|
19.1.5 Class out_of_range [lib.out.of.range]
|
399 |
|
|
|
400 |
|
|
T class out_of_range : public logic_error {
|
401 |
|
|
public:
|
402 |
|
|
T explicit out_of_range(const string& what_arg);
|
403 |
|
|
};
|
404 |
|
|
|
405 |
|
|
|
406 |
|
|
19.1.6 Class runtime_error [lib.runtime.error]
|
407 |
|
|
|
408 |
|
|
T class runtime_error : public exception {
|
409 |
|
|
public:
|
410 |
|
|
T explicit runtime_error(const string& what_arg);
|
411 |
|
|
};
|
412 |
|
|
|
413 |
|
|
|
414 |
|
|
19.1.7 Class range_error [lib.range.error]
|
415 |
|
|
|
416 |
|
|
T class range_error : public runtime_error {
|
417 |
|
|
public:
|
418 |
|
|
T explicit range_error(const string& what_arg);
|
419 |
|
|
};
|
420 |
|
|
|
421 |
|
|
19.1.8 Class overflow_error [lib.overflow.error]
|
422 |
|
|
|
423 |
|
|
T class overflow_error : public runtime_error {
|
424 |
|
|
public:
|
425 |
|
|
T explicit overflow_error(const string& what_arg);
|
426 |
|
|
};
|
427 |
|
|
|
428 |
|
|
|
429 |
|
|
19.1.9 Class underflow_error [lib.underflow.error]
|
430 |
|
|
|
431 |
|
|
T class underflow_error : public runtime_error {
|
432 |
|
|
public:
|
433 |
|
|
T explicit underflow_error(const string& what_arg);
|
434 |
|
|
};
|
435 |
|
|
|
436 |
|
|
|
437 |
|
|
19.2 Assertions [lib.assertions]
|
438 |
|
|
|
439 |
|
|
Table 2--Header synopsis
|
440 |
|
|
|
441 |
|
|
X Macro: assert
|
442 |
|
|
|
443 |
|
|
19.3 Error numbers [lib.errno]
|
444 |
|
|
|
445 |
|
|
Table 3--Header synopsis
|
446 |
|
|
|
447 |
|
|
X |Macros: EDOM ERANGE errno |
|
448 |
|
|
|
449 |
|
|
|
450 |
|
|
20.2 Utility components [lib.utility]
|
451 |
|
|
|
452 |
|
|
Header synopsis
|
453 |
|
|
|
454 |
|
|
// _lib.operators_, operators:
|
455 |
|
|
T namespace rel_ops {
|
456 |
|
|
T template bool operator!=(const T&, const T&);
|
457 |
|
|
T template bool operator> (const T&, const T&);
|
458 |
|
|
T template bool operator<=(const T&, const T&);
|
459 |
|
|
T template bool operator>=(const T&, const T&);
|
460 |
|
|
}
|
461 |
|
|
// _lib.pairs_, pairs:
|
462 |
|
|
T template struct pair;
|
463 |
|
|
T template
|
464 |
|
|
bool operator==(const pair&, const pair&);
|
465 |
|
|
T template
|
466 |
|
|
bool operator< (const pair&, const pair&);
|
467 |
|
|
T template
|
468 |
|
|
bool operator!=(const pair&, const pair&);
|
469 |
|
|
T template
|
470 |
|
|
bool operator> (const pair&, const pair&);
|
471 |
|
|
T template
|
472 |
|
|
bool operator>=(const pair&, const pair&);
|
473 |
|
|
T template
|
474 |
|
|
bool operator<=(const pair&, const pair&);
|
475 |
|
|
T template pair make_pair(const T1&, const T2&);
|
476 |
|
|
|
477 |
|
|
|
478 |
|
|
20.2.2 Pairs [lib.pairs]
|
479 |
|
|
|
480 |
|
|
T template
|
481 |
|
|
struct pair {
|
482 |
|
|
T typedef T1 first_type;
|
483 |
|
|
T typedef T2 second_type;
|
484 |
|
|
|
485 |
|
|
T T1 first;
|
486 |
|
|
T T2 second;
|
487 |
|
|
T pair();
|
488 |
|
|
T pair(const T1& x, const T2& y);
|
489 |
|
|
T template pair(const pair &p);
|
490 |
|
|
};
|
491 |
|
|
|
492 |
|
|
20.3 Function objects [lib.function.objects]
|
493 |
|
|
|
494 |
|
|
Header synopsis
|
495 |
|
|
|
496 |
|
|
// _lib.base_, base:
|
497 |
|
|
V template struct unary_function;
|
498 |
|
|
V template struct binary_function;
|
499 |
|
|
|
500 |
|
|
// _lib.arithmetic.operations_, arithmetic operations:
|
501 |
|
|
V template struct plus;
|
502 |
|
|
V template struct minus;
|
503 |
|
|
V template struct multiplies;
|
504 |
|
|
V template struct divides;
|
505 |
|
|
V template struct modulus;
|
506 |
|
|
V template struct negate;
|
507 |
|
|
// _lib.comparisons_, comparisons:
|
508 |
|
|
V template struct equal_to;
|
509 |
|
|
V template struct not_equal_to;
|
510 |
|
|
V template struct greater;
|
511 |
|
|
V template struct less;
|
512 |
|
|
V template struct greater_equal;
|
513 |
|
|
V template struct less_equal;
|
514 |
|
|
// _lib.logical.operations_, logical operations:
|
515 |
|
|
V template struct logical_and;
|
516 |
|
|
V template struct logical_or;
|
517 |
|
|
V template struct logical_not;
|
518 |
|
|
// _lib.negators_, negators:
|
519 |
|
|
template struct unary_negate;
|
520 |
|
|
V template
|
521 |
|
|
unary_negate not1(const Predicate&);
|
522 |
|
|
V template struct binary_negate;
|
523 |
|
|
V template
|
524 |
|
|
binary_negate not2(const Predicate&);
|
525 |
|
|
// _lib.binders_, binders:
|
526 |
|
|
V template class binder1st;
|
527 |
|
|
V template
|
528 |
|
|
binder1st bind1st(const Operation&, const T&);
|
529 |
|
|
V template class binder2nd;
|
530 |
|
|
V template
|
531 |
|
|
binder2nd bind2nd(const Operation&, const T&);
|
532 |
|
|
// _lib.function.pointer.adaptors_, adaptors:
|
533 |
|
|
V template class pointer_to_unary_function;
|
534 |
|
|
V template
|
535 |
|
|
pointer_to_unary_function ptr_fun(Result (*)(Arg));
|
536 |
|
|
V template
|
537 |
|
|
class pointer_to_binary_function;
|
538 |
|
|
V template
|
539 |
|
|
pointer_to_binary_function
|
540 |
|
|
ptr_fun(Result (*)(Arg1,Arg2));
|
541 |
|
|
|
542 |
|
|
// _lib.member.pointer.adaptors_, adaptors:
|
543 |
|
|
V template class mem_fun_t;
|
544 |
|
|
V template class mem_fun1_t;
|
545 |
|
|
V template
|
546 |
|
|
mem_fun_t mem_fun(S (T::*f)());
|
547 |
|
|
V template
|
548 |
|
|
mem_fun1_t mem_fun(S (T::*f)(A));
|
549 |
|
|
V template class mem_fun_ref_t;
|
550 |
|
|
V template class mem_fun1_ref_t;
|
551 |
|
|
V template
|
552 |
|
|
mem_fun_ref_t mem_fun_ref(S (T::*f)());
|
553 |
|
|
V template
|
554 |
|
|
mem_fun1_ref_t mem_fun_ref(S (T::*f)(A));
|
555 |
|
|
|
556 |
|
|
V template class const_mem_fun_t;
|
557 |
|
|
V template class const_mem_fun1_t;
|
558 |
|
|
V template
|
559 |
|
|
const_mem_fun_t mem_fun(S (T::*f)() const);
|
560 |
|
|
V template
|
561 |
|
|
const_mem_fun1_t mem_fun(S (T::*f)(A) const);
|
562 |
|
|
V template class const_mem_fun_ref_t;
|
563 |
|
|
V template class const_mem_fun1_ref_t;
|
564 |
|
|
V template
|
565 |
|
|
const_mem_fun_ref_t mem_fun_ref(S (T::*f)() const);
|
566 |
|
|
V template
|
567 |
|
|
const_mem_fun1_ref_t mem_fun_ref(S (T::*f)(A) const);
|
568 |
|
|
}
|
569 |
|
|
|
570 |
|
|
20.3.1 Base [lib.base]
|
571 |
|
|
|
572 |
|
|
V template
|
573 |
|
|
struct unary_function {
|
574 |
|
|
V typedef Arg argument_type;
|
575 |
|
|
V typedef Result result_type;
|
576 |
|
|
};
|
577 |
|
|
V template
|
578 |
|
|
struct binary_function {
|
579 |
|
|
V typedef Arg1 first_argument_type;
|
580 |
|
|
V typedef Arg2 second_argument_type;
|
581 |
|
|
V typedef Result result_type;
|
582 |
|
|
};
|
583 |
|
|
|
584 |
|
|
20.3.2 Arithmetic operations [lib.arithmetic.operations]
|
585 |
|
|
|
586 |
|
|
T template struct plus : binary_function {
|
587 |
|
|
V T operator()(const T& x, const T& y) const;
|
588 |
|
|
};
|
589 |
|
|
|
590 |
|
|
T template struct minus : binary_function {
|
591 |
|
|
V T operator()(const T& x, const T& y) const;
|
592 |
|
|
};
|
593 |
|
|
|
594 |
|
|
T template struct multiplies : binary_function {
|
595 |
|
|
V T operator()(const T& x, const T& y) const;
|
596 |
|
|
};
|
597 |
|
|
|
598 |
|
|
T template struct divides : binary_function {
|
599 |
|
|
V T operator()(const T& x, const T& y) const;
|
600 |
|
|
};
|
601 |
|
|
|
602 |
|
|
T template struct modulus : binary_function {
|
603 |
|
|
V T operator()(const T& x, const T& y) const;
|
604 |
|
|
};
|
605 |
|
|
|
606 |
|
|
T template struct negate : unary_function {
|
607 |
|
|
V T operator()(const T& x) const;
|
608 |
|
|
};
|
609 |
|
|
|
610 |
|
|
20.3.3 Comparisons [lib.comparisons]
|
611 |
|
|
|
612 |
|
|
T template struct equal_to : binary_function {
|
613 |
|
|
V bool operator()(const T& x, const T& y) const;
|
614 |
|
|
};
|
615 |
|
|
|
616 |
|
|
T template struct not_equal_to : binary_function {
|
617 |
|
|
V bool operator()(const T& x, const T& y) const;
|
618 |
|
|
};
|
619 |
|
|
|
620 |
|
|
T template struct greater : binary_function {
|
621 |
|
|
V bool operator()(const T& x, const T& y) const;
|
622 |
|
|
};
|
623 |
|
|
|
624 |
|
|
T template struct less : binary_function {
|
625 |
|
|
V bool operator()(const T& x, const T& y) const;
|
626 |
|
|
};
|
627 |
|
|
|
628 |
|
|
T template struct greater_equal : binary_function {
|
629 |
|
|
V bool operator()(const T& x, const T& y) const;
|
630 |
|
|
};
|
631 |
|
|
|
632 |
|
|
T template struct less_equal : binary_function {
|
633 |
|
|
V bool operator()(const T& x, const T& y) const;
|
634 |
|
|
};
|
635 |
|
|
|
636 |
|
|
20.3.4 Logical operations [lib.logical.operations]
|
637 |
|
|
|
638 |
|
|
T template struct logical_and : binary_function {
|
639 |
|
|
V bool operator()(const T& x, const T& y) const;
|
640 |
|
|
};
|
641 |
|
|
|
642 |
|
|
T template struct logical_or : binary_function {
|
643 |
|
|
V bool operator()(const T& x, const T& y) const;
|
644 |
|
|
};
|
645 |
|
|
|
646 |
|
|
T template struct logical_not : unary_function {
|
647 |
|
|
V bool operator()(const T& x) const;
|
648 |
|
|
};
|
649 |
|
|
|
650 |
|
|
20.3.5 Negators [lib.negators]
|
651 |
|
|
|
652 |
|
|
T template
|
653 |
|
|
class unary_negate
|
654 |
|
|
: public unary_function {
|
655 |
|
|
public:
|
656 |
|
|
T explicit unary_negate(const Predicate& pred);
|
657 |
|
|
V bool operator()(const typename Predicate::argument_type& x) const;
|
658 |
|
|
};
|
659 |
|
|
|
660 |
|
|
T template
|
661 |
|
|
class binary_negate
|
662 |
|
|
: public binary_function
|
663 |
|
|
typename Predicate::second_argument_type, bool> {
|
664 |
|
|
public:
|
665 |
|
|
T explicit binary_negate(const Predicate& pred);
|
666 |
|
|
V bool operator()(const typename Predicate::first_argument_type& x,
|
667 |
|
|
const typename Predicate::second_argument_type& y) const;
|
668 |
|
|
};
|
669 |
|
|
|
670 |
|
|
|
671 |
|
|
20.3.6 Binders [lib.binders]
|
672 |
|
|
|
673 |
|
|
20.3.6.1 Template class binder1st [lib.binder.1st]
|
674 |
|
|
T template
|
675 |
|
|
class binder1st
|
676 |
|
|
: public unary_function
|
677 |
|
|
typename Operation::result_type> {
|
678 |
|
|
protected:
|
679 |
|
|
T Operation op;
|
680 |
|
|
T typename Operation::first_argument_type value;
|
681 |
|
|
public:
|
682 |
|
|
V binder1st(const Operation& x,
|
683 |
|
|
const typename Operation::first_argument_type& y);
|
684 |
|
|
V typename Operation::result_type
|
685 |
|
|
operator()(const typename Operation::second_argument_type& x) const;
|
686 |
|
|
};
|
687 |
|
|
|
688 |
|
|
20.3.6.2 bind1st [lib.bind.1st]
|
689 |
|
|
|
690 |
|
|
V template
|
691 |
|
|
binder1st bind1st(const Operation& op, const T& x);
|
692 |
|
|
|
693 |
|
|
20.3.6.3 Template class binder2nd [lib.binder.2nd]
|
694 |
|
|
T template
|
695 |
|
|
class binder2nd
|
696 |
|
|
: public unary_function
|
697 |
|
|
typename Operation::result_type> {
|
698 |
|
|
protected:
|
699 |
|
|
T Operation op;
|
700 |
|
|
T typename Operation::second_argument_type value;
|
701 |
|
|
public:
|
702 |
|
|
V binder2nd(const Operation& x,
|
703 |
|
|
const typename Operation::second_argument_type& y);
|
704 |
|
|
V typename Operation::result_type
|
705 |
|
|
operator()(const typename Operation::first_argument_type& x) const;
|
706 |
|
|
};
|
707 |
|
|
|
708 |
|
|
20.3.6.4 bind2nd [lib.bind.2nd]
|
709 |
|
|
|
710 |
|
|
T template
|
711 |
|
|
binder2nd bind2nd(const Operation& op, const T& x);
|
712 |
|
|
|
713 |
|
|
|
714 |
|
|
20.3.7 Adaptors for pointers to [lib.function.pointer.adaptors]
|
715 |
|
|
functions
|
716 |
|
|
|
717 |
|
|
1 To allow pointers to (unary and binary) functions to work with func-
|
718 |
|
|
tion adaptors the library provides:
|
719 |
|
|
|
720 |
|
|
T template
|
721 |
|
|
class pointer_to_unary_function : public unary_function {
|
722 |
|
|
public:
|
723 |
|
|
T explicit pointer_to_unary_function(Result (*f)(Arg));
|
724 |
|
|
V Result operator()(Arg x) const;
|
725 |
|
|
};
|
726 |
|
|
|
727 |
|
|
T template
|
728 |
|
|
pointer_to_unary_function ptr_fun(Result (*f)(Arg));
|
729 |
|
|
|
730 |
|
|
T template
|
731 |
|
|
class pointer_to_binary_function :
|
732 |
|
|
public binary_function {
|
733 |
|
|
public:
|
734 |
|
|
T explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2));
|
735 |
|
|
V Result operator()(Arg1 x, Arg2 y) const;
|
736 |
|
|
};
|
737 |
|
|
|
738 |
|
|
|
739 |
|
|
20.3.8 Adaptors for pointers to [lib.member.pointer.adaptors]
|
740 |
|
|
members
|
741 |
|
|
|
742 |
|
|
T template class mem_fun_t
|
743 |
|
|
: public unary_function {
|
744 |
|
|
public:
|
745 |
|
|
T explicit mem_fun_t(S (T::*p)());
|
746 |
|
|
V S operator()(T* p) const;
|
747 |
|
|
};
|
748 |
|
|
|
749 |
|
|
T template class mem_fun1_t
|
750 |
|
|
: public binary_function {
|
751 |
|
|
public:
|
752 |
|
|
T explicit mem_fun1_t(S (T::*p)(A));
|
753 |
|
|
V S operator()(T* p, A x) const;
|
754 |
|
|
};
|
755 |
|
|
|
756 |
|
|
V template mem_fun_t
|
757 |
|
|
mem_fun(S (T::*f)());
|
758 |
|
|
V template mem_fun1_t
|
759 |
|
|
mem_fun(S (T::*f)(A));
|
760 |
|
|
|
761 |
|
|
T template class mem_fun_ref_t
|
762 |
|
|
: public unary_function {
|
763 |
|
|
public:
|
764 |
|
|
T explicit mem_fun_ref_t(S (T::*p)());
|
765 |
|
|
V S operator()(T& p) const;
|
766 |
|
|
};
|
767 |
|
|
|
768 |
|
|
T template class mem_fun1_ref_t
|
769 |
|
|
: public binary_function {
|
770 |
|
|
public:
|
771 |
|
|
T explicit mem_fun1_ref_t(S (T::*p)(A));
|
772 |
|
|
V S operator()(T& p, A x) const;
|
773 |
|
|
};
|
774 |
|
|
|
775 |
|
|
T template mem_fun_ref_t
|
776 |
|
|
mem_fun_ref(S (T::*f)());
|
777 |
|
|
|
778 |
|
|
T template mem_fun1_ref_t
|
779 |
|
|
mem_fun_ref(S (T::*f)(A));
|
780 |
|
|
|
781 |
|
|
T template class const_mem_fun_t
|
782 |
|
|
: public unary_function {
|
783 |
|
|
public:
|
784 |
|
|
T explicit const_mem_fun_t(S (T::*p)() const);
|
785 |
|
|
V S operator()(const T* p) const;
|
786 |
|
|
};
|
787 |
|
|
|
788 |
|
|
T template class const_mem_fun1_t
|
789 |
|
|
: public binary_function {
|
790 |
|
|
public:
|
791 |
|
|
T explicit const mem_fun1_t(S (T::*p)(A) const);
|
792 |
|
|
V S operator()(const T* p, A x) const;
|
793 |
|
|
};
|
794 |
|
|
|
795 |
|
|
V template const_mem_fun_t
|
796 |
|
|
mem_fun(S (T::*f)() const);
|
797 |
|
|
V template const_mem_fun1_t
|
798 |
|
|
mem_fun(S (T::*f)(A) const);
|
799 |
|
|
|
800 |
|
|
T template class const_mem_fun_ref_t
|
801 |
|
|
: public unary_function {
|
802 |
|
|
public:
|
803 |
|
|
T explicit const_mem_fun_ref_t(S (T::*p)() const);
|
804 |
|
|
V S operator()(const T& p) const;
|
805 |
|
|
};
|
806 |
|
|
|
807 |
|
|
T template class const_mem_fun1_ref_t
|
808 |
|
|
: public binary_function {
|
809 |
|
|
public:
|
810 |
|
|
T explicit const_mem_fun1_ref_t(S (T::*p)(A) const);
|
811 |
|
|
V S operator()(const T& p, A x) const;
|
812 |
|
|
};
|
813 |
|
|
|
814 |
|
|
T template const_mem_fun_ref_t
|
815 |
|
|
mem_fun_ref(S (T::*f)() const);
|
816 |
|
|
|
817 |
|
|
T template const_mem_fun1_ref_t
|
818 |
|
|
mem_fun_ref(S (T::*f)(A) const);
|
819 |
|
|
|
820 |
|
|
20.4 Memory [lib.memory]
|
821 |
|
|
|
822 |
|
|
Header synopsis
|
823 |
|
|
|
824 |
|
|
// _lib.default.allocator_, the default allocator:
|
825 |
|
|
T template class allocator;
|
826 |
|
|
T template <> class allocator;
|
827 |
|
|
T template
|
828 |
|
|
bool operator==(const allocator&, const allocator&) throw();
|
829 |
|
|
T template
|
830 |
|
|
bool operator!=(const allocator&, const allocator&) throw();
|
831 |
|
|
// _lib.storage.iterator_, raw storage iterator:
|
832 |
|
|
T template class raw_storage_iterator;
|
833 |
|
|
// _lib.temporary.buffer_, temporary buffers:
|
834 |
|
|
T template
|
835 |
|
|
pair get_temporary_buffer(ptrdiff_t n);
|
836 |
|
|
T template
|
837 |
|
|
void return_temporary_buffer(T* p);
|
838 |
|
|
// _lib.specialized.algorithms_, specialized algorithms:
|
839 |
|
|
T template
|
840 |
|
|
ForwardIterator
|
841 |
|
|
uninitialized_copy(InputIterator first, InputIterator last,
|
842 |
|
|
ForwardIterator result);
|
843 |
|
|
T template
|
844 |
|
|
void uninitialized_fill(ForwardIterator first, ForwardIterator last,
|
845 |
|
|
const T& x);
|
846 |
|
|
T template
|
847 |
|
|
void uninitialized_fill_n(ForwardIterator first, Size n, const T& x);
|
848 |
|
|
// _lib.auto.ptr_, pointers:
|
849 |
|
|
X template class auto_ptr;
|
850 |
|
|
}
|
851 |
|
|
|
852 |
|
|
20.4.1 The default allocator [lib.default.allocator]
|
853 |
|
|
|
854 |
|
|
T template class allocator;
|
855 |
|
|
// specialize for void:
|
856 |
|
|
T template <> class allocator {
|
857 |
|
|
public:
|
858 |
|
|
T typedef void* pointer;
|
859 |
|
|
T typedef const void* const_pointer;
|
860 |
|
|
// reference-to-void members are impossible.
|
861 |
|
|
T typedef void value_type;
|
862 |
|
|
T template struct rebind { typedef allocator other; };
|
863 |
|
|
};
|
864 |
|
|
|
865 |
|
|
T template class allocator {
|
866 |
|
|
public:
|
867 |
|
|
T typedef size_t size_type;
|
868 |
|
|
T typedef ptrdiff_t difference_type;
|
869 |
|
|
T typedef T* pointer;
|
870 |
|
|
T typedef const T* const_pointer;
|
871 |
|
|
T typedef T& reference;
|
872 |
|
|
T typedef const T& const_reference;
|
873 |
|
|
T typedef T value_type;
|
874 |
|
|
T template struct rebind { typedef allocator other; };
|
875 |
|
|
T allocator() throw();
|
876 |
|
|
T allocator(const allocator&) throw();
|
877 |
|
|
T template allocator(const allocator&) throw();
|
878 |
|
|
T ~allocator() throw();
|
879 |
|
|
T pointer address(reference x) const;
|
880 |
|
|
T const_pointer address(const_reference x) const;
|
881 |
|
|
T pointer allocate(
|
882 |
|
|
size_type, allocator::const_pointer hint = 0);
|
883 |
|
|
T void deallocate(pointer p, size_type n);
|
884 |
|
|
T size_type max_size() const throw();
|
885 |
|
|
T void construct(pointer p, const T& val);
|
886 |
|
|
T void destroy(pointer p);
|
887 |
|
|
};
|
888 |
|
|
|
889 |
|
|
20.4.1.2 allocator globals [lib.allocator.globals]
|
890 |
|
|
|
891 |
|
|
T template
|
892 |
|
|
bool operator==(const allocator&, const allocator&) throw();
|
893 |
|
|
T template
|
894 |
|
|
bool operator!=(const allocator&, const allocator&) throw();
|
895 |
|
|
|
896 |
|
|
20.4.2 Raw storage iterator [lib.storage.iterator]
|
897 |
|
|
|
898 |
|
|
T template
|
899 |
|
|
class raw_storage_iterator
|
900 |
|
|
: public iterator {
|
901 |
|
|
public:
|
902 |
|
|
T explicit raw_storage_iterator(OutputIterator x);
|
903 |
|
|
T raw_storage_iterator& operator*();
|
904 |
|
|
T raw_storage_iterator& operator=(const T& element);
|
905 |
|
|
T raw_storage_iterator& operator++();
|
906 |
|
|
T raw_storage_iterator operator++(int);
|
907 |
|
|
};
|
908 |
|
|
|
909 |
|
|
20.4.3 Temporary buffers [lib.temporary.buffer]
|
910 |
|
|
|
911 |
|
|
T template
|
912 |
|
|
pair get_temporary_buffer(ptrdiff_t n);
|
913 |
|
|
|
914 |
|
|
T template void return_temporary_buffer(T* p);
|
915 |
|
|
|
916 |
|
|
20.4.4 Specialized algorithms [lib.specialized.algorithms]
|
917 |
|
|
|
918 |
|
|
20.4.4.1 uninitialized_copy [lib.uninitialized.copy]
|
919 |
|
|
|
920 |
|
|
V template
|
921 |
|
|
ForwardIterator
|
922 |
|
|
uninitialized_copy(InputIterator first, InputIterator last,
|
923 |
|
|
ForwardIterator result);
|
924 |
|
|
|
925 |
|
|
20.4.4.2 uninitialized_fill [lib.uninitialized.fill]
|
926 |
|
|
|
927 |
|
|
V template
|
928 |
|
|
void uninitialized_fill(ForwardIterator first, ForwardIterator last,
|
929 |
|
|
const T& x);
|
930 |
|
|
|
931 |
|
|
20.4.4.3 uninitialized_fill_n [lib.uninitialized.fill.n]
|
932 |
|
|
|
933 |
|
|
V template
|
934 |
|
|
void uninitialized_fill_n(ForwardIterator first, Size n, const T& x);
|
935 |
|
|
|
936 |
|
|
20.4.5 Template class auto_ptr [lib.auto.ptr]
|
937 |
|
|
|
938 |
|
|
X template class auto_ptr {
|
939 |
|
|
template struct auto_ptr_ref {};
|
940 |
|
|
public:
|
941 |
|
|
T typedef X element_type;
|
942 |
|
|
// _lib.auto.ptr.cons_ construct/copy/destroy:
|
943 |
|
|
T explicit auto_ptr(X* p =0) throw();
|
944 |
|
|
T auto_ptr(auto_ptr&) throw();
|
945 |
|
|
T template auto_ptr(auto_ptr&) throw();
|
946 |
|
|
T auto_ptr& operator=(auto_ptr&) throw();
|
947 |
|
|
T template auto_ptr& operator=(auto_ptr&) throw();
|
948 |
|
|
T ~auto_ptr() throw();
|
949 |
|
|
// _lib.auto.ptr.members_ members:
|
950 |
|
|
T X& operator*() const throw();
|
951 |
|
|
T X* operator->() const throw();
|
952 |
|
|
T X* get() const throw();
|
953 |
|
|
T X* release() throw();
|
954 |
|
|
T void reset(X* p =0) throw();
|
955 |
|
|
|
956 |
|
|
// _lib.auto.ptr.conv_ conversions:
|
957 |
|
|
X auto_ptr(auto_ptr_ref) throw();
|
958 |
|
|
X template operator auto_ptr_ref() throw();
|
959 |
|
|
X template operator auto_ptr() throw();
|
960 |
|
|
};
|
961 |
|
|
|
962 |
|
|
20.4.6 C Library [lib.c.malloc]
|
963 |
|
|
|
964 |
|
|
Table 7--Header synopsis
|
965 |
|
|
|
966 |
|
|
X Functions: calloc malloc
|
967 |
|
|
free realloc
|
968 |
|
|
|
969 |
|
|
|
970 |
|
|
Table 8--Header synopsis
|
971 |
|
|
|
972 |
|
|
X Macro: NULL
|
973 |
|
|
X Type: size_t
|
974 |
|
|
X Functions: memchr memcmp
|
975 |
|
|
X memcpy memmove memset
|
976 |
|
|
|
977 |
|
|
Table 9--Header synopsis
|
978 |
|
|
|
979 |
|
|
X Macros: NULL
|
980 |
|
|
X Types: size_t clock_t time_t
|
981 |
|
|
X Struct: tm
|
982 |
|
|
Functions:
|
983 |
|
|
X asctime clock difftime localtime strftime
|
984 |
|
|
X ctime gmtime mktime time
|
985 |
|
|
|
986 |
|
|
21.1.1 Character traits requirements [lib.char.traits.require]
|
987 |
|
|
|
988 |
|
|
2 The struct template
|
989 |
|
|
T template struct char_traits;
|
990 |
|
|
shall be provided in the header as a basis for explicit spe-
|
991 |
|
|
cializations.
|
992 |
|
|
|
993 |
|
|
|
994 |
|
|
21.1.3.1 struct [lib.char.traits.specializations.char]
|
995 |
|
|
char_traits
|
996 |
|
|
|
997 |
|
|
T template<>
|
998 |
|
|
struct char_traits {
|
999 |
|
|
T typedef char char_type;
|
1000 |
|
|
T typedef int int_type;
|
1001 |
|
|
T typedef streamoff off_type;
|
1002 |
|
|
T typedef streampos pos_type;
|
1003 |
|
|
T typedef mbstate_t state_type;
|
1004 |
|
|
|
1005 |
|
|
T static void assign(char_type& c1, const char_type& c2);
|
1006 |
|
|
T static bool eq(const char_type& c1, const char_type& c2);
|
1007 |
|
|
T static bool lt(const char_type& c1, const char_type& c2);
|
1008 |
|
|
|
1009 |
|
|
T static int compare(const char_type* s1, const char_type* s2, size_t n);
|
1010 |
|
|
T static size_t length(const char_type* s);
|
1011 |
|
|
T static const char_type* find(const char_type* s, size_t n,
|
1012 |
|
|
const char_type& a);
|
1013 |
|
|
T static char_type* move(char_type* s1, const char_type* s2, size_t n);
|
1014 |
|
|
T static char_type* copy(char_type* s1, const char_type* s2, size_t n);
|
1015 |
|
|
T static char_type* assign(char_type* s, size_t n, char_type a);
|
1016 |
|
|
|
1017 |
|
|
T static int_type not_eof(const int_type& c);
|
1018 |
|
|
T static char_type to_char_type(const int_type& c);
|
1019 |
|
|
T static int_type to_int_type(const char_type& c);
|
1020 |
|
|
T static bool eq_int_type(const int_type& c1, const int_type& c2);
|
1021 |
|
|
T static int_type eof();
|
1022 |
|
|
};
|
1023 |
|
|
|
1024 |
|
|
21.1.3.2 struct [lib.char.traits.specializations.wchar.t]
|
1025 |
|
|
char_traits
|
1026 |
|
|
|
1027 |
|
|
V template<>
|
1028 |
|
|
struct char_traits {
|
1029 |
|
|
V typedef wchar_t char_type;
|
1030 |
|
|
V typedef wint_t int_type;
|
1031 |
|
|
V typedef streamoff off_type;
|
1032 |
|
|
V typedef wstreampos pos_type;
|
1033 |
|
|
V typedef mbstate_t state_type;
|
1034 |
|
|
|
1035 |
|
|
V static void assign(char_type& c1, const char_type& c2);
|
1036 |
|
|
V static bool eq(const char_type& c1, const char_type& c2);
|
1037 |
|
|
V static bool lt(const char_type& c1, const char_type& c2);
|
1038 |
|
|
|
1039 |
|
|
V static int compare(const char_type* s1, const char_type* s2, size_t n);
|
1040 |
|
|
V static size_t length(const char_type* s);
|
1041 |
|
|
V static const char_type* find(const char_type* s, size_t n,
|
1042 |
|
|
const char_type& a);
|
1043 |
|
|
V static char_type* move(char_type* s1, const char_type* s2, size_t n);
|
1044 |
|
|
V static char_type* copy(char_type* s1, const char_type* s2, size_t n);
|
1045 |
|
|
V static char_type* assign(char_type* s, size_t n, char_type a);
|
1046 |
|
|
|
1047 |
|
|
V static int_type not_eof(const int_type& c);
|
1048 |
|
|
V static char_type to_char_type(const int_type& c);
|
1049 |
|
|
V static int_type to_int_type(const char_type& c);
|
1050 |
|
|
V static bool eq_int_type(const int_type& c1, const int_type& c2);
|
1051 |
|
|
V static int_type eof();
|
1052 |
|
|
};
|
1053 |
|
|
|
1054 |
|
|
21.2 String classes [lib.string.classes]
|
1055 |
|
|
|
1056 |
|
|
// _lib.char.traits_, character traits:
|
1057 |
|
|
V template
|
1058 |
|
|
struct char_traits;
|
1059 |
|
|
V template <> struct char_traits;
|
1060 |
|
|
V template <> struct char_traits;
|
1061 |
|
|
|
1062 |
|
|
// _lib.basic.string_, basic_string:
|
1063 |
|
|
V template,
|
1064 |
|
|
class Allocator = allocator >
|
1065 |
|
|
class basic_string;
|
1066 |
|
|
V template
|
1067 |
|
|
basic_string
|
1068 |
|
|
operator+(const basic_string& lhs,
|
1069 |
|
|
const basic_string& rhs);
|
1070 |
|
|
V template
|
1071 |
|
|
basic_string
|
1072 |
|
|
operator+(const charT* lhs,
|
1073 |
|
|
const basic_string& rhs);
|
1074 |
|
|
V template
|
1075 |
|
|
basic_string
|
1076 |
|
|
operator+(charT lhs, const basic_string& rhs);
|
1077 |
|
|
V template
|
1078 |
|
|
basic_string
|
1079 |
|
|
operator+(const basic_string& lhs,
|
1080 |
|
|
const charT* rhs);
|
1081 |
|
|
V template
|
1082 |
|
|
basic_string
|
1083 |
|
|
operator+(const basic_string& lhs, charT rhs);
|
1084 |
|
|
|
1085 |
|
|
V template
|
1086 |
|
|
bool operator==(const basic_string& lhs,
|
1087 |
|
|
const basic_string& rhs);
|
1088 |
|
|
V template
|
1089 |
|
|
bool operator==(const charT* lhs,
|
1090 |
|
|
const basic_string& rhs);
|
1091 |
|
|
V template
|
1092 |
|
|
bool operator==(const basic_string& lhs,
|
1093 |
|
|
const charT* rhs);
|
1094 |
|
|
V template
|
1095 |
|
|
bool operator!=(const basic_string& lhs,
|
1096 |
|
|
const basic_string& rhs);
|
1097 |
|
|
V template
|
1098 |
|
|
bool operator!=(const charT* lhs,
|
1099 |
|
|
const basic_string& rhs);
|
1100 |
|
|
V template
|
1101 |
|
|
bool operator!=(const basic_string& lhs,
|
1102 |
|
|
const charT* rhs);
|
1103 |
|
|
V template
|
1104 |
|
|
bool operator< (const basic_string& lhs,
|
1105 |
|
|
const basic_string& rhs);
|
1106 |
|
|
V template
|
1107 |
|
|
bool operator< (const basic_string& lhs,
|
1108 |
|
|
const charT* rhs);
|
1109 |
|
|
V template
|
1110 |
|
|
bool operator< (const charT* lhs,
|
1111 |
|
|
const basic_string& rhs);
|
1112 |
|
|
V template
|
1113 |
|
|
bool operator> (const basic_string& lhs,
|
1114 |
|
|
const basic_string& rhs);
|
1115 |
|
|
V template
|
1116 |
|
|
bool operator> (const basic_string& lhs,
|
1117 |
|
|
const charT* rhs);
|
1118 |
|
|
V template
|
1119 |
|
|
bool operator> (const charT* lhs,
|
1120 |
|
|
const basic_string& rhs);
|
1121 |
|
|
V template
|
1122 |
|
|
bool operator<=(const basic_string& lhs,
|
1123 |
|
|
const basic_string& rhs);
|
1124 |
|
|
V template
|
1125 |
|
|
bool operator<=(const basic_string& lhs,
|
1126 |
|
|
const charT* rhs);
|
1127 |
|
|
V template
|
1128 |
|
|
bool operator<=(const charT* lhs,
|
1129 |
|
|
const basic_string& rhs);
|
1130 |
|
|
V template
|
1131 |
|
|
bool operator>=(const basic_string& lhs,
|
1132 |
|
|
const basic_string& rhs);
|
1133 |
|
|
V template
|
1134 |
|
|
bool operator>=(const basic_string& lhs,
|
1135 |
|
|
const charT* rhs);
|
1136 |
|
|
V template
|
1137 |
|
|
bool operator>=(const charT* lhs,
|
1138 |
|
|
const basic_string& rhs);
|
1139 |
|
|
|
1140 |
|
|
// _lib.string.special_:
|
1141 |
|
|
V template
|
1142 |
|
|
void swap(basic_string& lhs,
|
1143 |
|
|
basic_string& rhs);
|
1144 |
|
|
V template
|
1145 |
|
|
basic_istream&
|
1146 |
|
|
operator>>(basic_istream& is,
|
1147 |
|
|
basic_string& str);
|
1148 |
|
|
T template
|
1149 |
|
|
basic_ostream&
|
1150 |
|
|
operator<<(basic_ostream& os,
|
1151 |
|
|
const basic_string& str);
|
1152 |
|
|
V template
|
1153 |
|
|
basic_istream&
|
1154 |
|
|
getline(basic_istream& is,
|
1155 |
|
|
basic_string& str,
|
1156 |
|
|
charT delim);
|
1157 |
|
|
V template
|
1158 |
|
|
basic_istream&
|
1159 |
|
|
getline(basic_istream& is,
|
1160 |
|
|
basic_string& str);
|
1161 |
|
|
V typedef basic_string string;
|
1162 |
|
|
T typedef basic_string wstring;
|
1163 |
|
|
}
|
1164 |
|
|
|
1165 |
|
|
21.3 Template class basic_string [lib.basic.string]
|
1166 |
|
|
|
1167 |
|
|
V namespace std {
|
1168 |
|
|
template,
|
1169 |
|
|
class Allocator = allocator >
|
1170 |
|
|
class basic_string {
|
1171 |
|
|
public:
|
1172 |
|
|
// types:
|
1173 |
|
|
typedef traits traits_type;
|
1174 |
|
|
typedef typename traits::char_type value_type;
|
1175 |
|
|
typedef Allocator allocator_type;
|
1176 |
|
|
typedef typename Allocator::size_type size_type;
|
1177 |
|
|
typedef typename Allocator::difference_type difference_type;
|
1178 |
|
|
typedef typename Allocator::reference reference;
|
1179 |
|
|
typedef typename Allocator::const_reference const_reference;
|
1180 |
|
|
typedef typename Allocator::pointer pointer;
|
1181 |
|
|
typedef typename Allocator::const_pointer const_pointer;
|
1182 |
|
|
typedef implementation defined iterator;
|
1183 |
|
|
typedef implementation defined const_iterator;
|
1184 |
|
|
typedef std::reverse_iterator reverse_iterator;
|
1185 |
|
|
typedef std::reverse_iterator const_reverse_iterator;
|
1186 |
|
|
static const size_type npos = -1;
|
1187 |
|
|
|
1188 |
|
|
// _lib.string.cons_ construct/copy/destroy:
|
1189 |
|
|
V explicit basic_string(const Allocator& a = Allocator());
|
1190 |
|
|
V basic_string(const basic_string& str, size_type pos = 0,
|
1191 |
|
|
size_type n = npos, const Allocator& a = Allocator());
|
1192 |
|
|
V basic_string(const charT* s,
|
1193 |
|
|
size_type n, const Allocator& a = Allocator());
|
1194 |
|
|
V basic_string(const charT* s, const Allocator& a = Allocator());
|
1195 |
|
|
V basic_string(size_type n, charT c, const Allocator& a = Allocator());
|
1196 |
|
|
V template
|
1197 |
|
|
basic_string(InputIterator begin, InputIterator end,
|
1198 |
|
|
const Allocator& a = Allocator());
|
1199 |
|
|
V ~basic_string();
|
1200 |
|
|
V basic_string& operator=(const basic_string& str);
|
1201 |
|
|
V basic_string& operator=(const charT* s);
|
1202 |
|
|
V basic_string& operator=(charT c);
|
1203 |
|
|
// _lib.string.iterators_ iterators:
|
1204 |
|
|
V iterator begin();
|
1205 |
|
|
V const_iterator begin() const;
|
1206 |
|
|
V iterator end();
|
1207 |
|
|
V const_iterator end() const;
|
1208 |
|
|
|
1209 |
|
|
V reverse_iterator rbegin();
|
1210 |
|
|
V const_reverse_iterator rbegin() const;
|
1211 |
|
|
V reverse_iterator rend();
|
1212 |
|
|
V const_reverse_iterator rend() const;
|
1213 |
|
|
// _lib.string.capacity_ capacity:
|
1214 |
|
|
V size_type size() const;
|
1215 |
|
|
V size_type length() const;
|
1216 |
|
|
V size_type max_size() const;
|
1217 |
|
|
V void resize(size_type n, charT c);
|
1218 |
|
|
V void resize(size_type n);
|
1219 |
|
|
V size_type capacity() const;
|
1220 |
|
|
V void reserve(size_type res_arg = 0);
|
1221 |
|
|
V void clear();
|
1222 |
|
|
V bool empty() const;
|
1223 |
|
|
// _lib.string.access_ element access:
|
1224 |
|
|
V const_reference operator[](size_type pos) const;
|
1225 |
|
|
V reference operator[](size_type pos);
|
1226 |
|
|
V const_reference at(size_type n) const;
|
1227 |
|
|
V reference at(size_type n);
|
1228 |
|
|
// _lib.string.modifiers_ modifiers:
|
1229 |
|
|
V basic_string& operator+=(const basic_string& str);
|
1230 |
|
|
V basic_string& operator+=(const charT* s);
|
1231 |
|
|
V basic_string& operator+=(charT c);
|
1232 |
|
|
V basic_string& append(const basic_string& str);
|
1233 |
|
|
V basic_string& append(const basic_string& str, size_type pos,
|
1234 |
|
|
size_type n);
|
1235 |
|
|
V basic_string& append(const charT* s, size_type n);
|
1236 |
|
|
V basic_string& append(const charT* s);
|
1237 |
|
|
V basic_string& append(size_type n, charT c);
|
1238 |
|
|
V template
|
1239 |
|
|
basic_string& append(InputIterator first, InputIterator last);
|
1240 |
|
|
V void push_back(const charT);
|
1241 |
|
|
|
1242 |
|
|
V basic_string& assign(const basic_string&);
|
1243 |
|
|
V basic_string& assign(const basic_string& str, size_type pos,
|
1244 |
|
|
size_type n);
|
1245 |
|
|
V basic_string& assign(const charT* s, size_type n);
|
1246 |
|
|
V basic_string& assign(const charT* s);
|
1247 |
|
|
V basic_string& assign(size_type n, charT c);
|
1248 |
|
|
V template
|
1249 |
|
|
basic_string& assign(InputIterator first, InputIterator last);
|
1250 |
|
|
V basic_string& insert(size_type pos1, const basic_string& str);
|
1251 |
|
|
V basic_string& insert(size_type pos1, const basic_string& str,
|
1252 |
|
|
size_type pos2, size_type n);
|
1253 |
|
|
V basic_string& insert(size_type pos, const charT* s, size_type n);
|
1254 |
|
|
V basic_string& insert(size_type pos, const charT* s);
|
1255 |
|
|
V basic_string& insert(size_type pos, size_type n, charT c);
|
1256 |
|
|
V iterator insert(iterator p, charT c);
|
1257 |
|
|
V void insert(iterator p, size_type n, charT c);
|
1258 |
|
|
V template
|
1259 |
|
|
void insert(iterator p, InputIterator first, InputIterator last);
|
1260 |
|
|
V basic_string& erase(size_type pos = 0, size_type n = npos);
|
1261 |
|
|
V iterator erase(iterator position);
|
1262 |
|
|
V iterator erase(iterator first, iterator last);
|
1263 |
|
|
V basic_string& replace(size_type pos1, size_type n1,
|
1264 |
|
|
const basic_string& str);
|
1265 |
|
|
V basic_string& replace(size_type pos1, size_type n1,
|
1266 |
|
|
const basic_string& str,
|
1267 |
|
|
size_type pos2, size_type n2);
|
1268 |
|
|
V basic_string& replace(size_type pos, size_type n1, const charT* s,
|
1269 |
|
|
size_type n2);
|
1270 |
|
|
V basic_string& replace(size_type pos, size_type n1, const charT* s);
|
1271 |
|
|
V basic_string& replace(size_type pos, size_type n1, size_type n2,
|
1272 |
|
|
charT c);
|
1273 |
|
|
V basic_string& replace(iterator i1, iterator i2, const basic_string& str);
|
1274 |
|
|
V basic_string& replace(iterator i1, iterator i2, const charT* s,
|
1275 |
|
|
size_type n);
|
1276 |
|
|
V basic_string& replace(iterator i1, iterator i2, const charT* s);
|
1277 |
|
|
V basic_string& replace(iterator i1, iterator i2,
|
1278 |
|
|
size_type n, charT c);
|
1279 |
|
|
V template
|
1280 |
|
|
basic_string& replace(iterator i1, iterator i2,
|
1281 |
|
|
InputIterator j1, InputIterator j2);
|
1282 |
|
|
V size_type copy(charT* s, size_type n, size_type pos = 0) const;
|
1283 |
|
|
V void swap(basic_string&);
|
1284 |
|
|
// _lib.string.ops_ string operations:
|
1285 |
|
|
V const charT* c_str() const; // explicit
|
1286 |
|
|
V const charT* data() const;
|
1287 |
|
|
V allocator_type get_allocator() const;
|
1288 |
|
|
V size_type find (const basic_string& str, size_type pos = 0) const;
|
1289 |
|
|
V size_type find (const charT* s, size_type pos, size_type n) const;
|
1290 |
|
|
V size_type find (const charT* s, size_type pos = 0) const;
|
1291 |
|
|
V size_type find (charT c, size_type pos = 0) const;
|
1292 |
|
|
V size_type rfind(const basic_string& str, size_type pos = npos) const;
|
1293 |
|
|
V size_type rfind(const charT* s, size_type pos, size_type n) const;
|
1294 |
|
|
V size_type rfind(const charT* s, size_type pos = npos) const;
|
1295 |
|
|
V size_type rfind(charT c, size_type pos = npos) const;
|
1296 |
|
|
|
1297 |
|
|
V size_type find_first_of(const basic_string& str,
|
1298 |
|
|
size_type pos = 0) const;
|
1299 |
|
|
V size_type find_first_of(const charT* s,
|
1300 |
|
|
size_type pos, size_type n) const;
|
1301 |
|
|
V size_type find_first_of(const charT* s, size_type pos = 0) const;
|
1302 |
|
|
V size_type find_first_of(charT c, size_type pos = 0) const;
|
1303 |
|
|
V size_type find_last_of (const basic_string& str,
|
1304 |
|
|
size_type pos = npos) const;
|
1305 |
|
|
V size_type find_last_of (const charT* s,
|
1306 |
|
|
size_type pos, size_type n) const;
|
1307 |
|
|
V size_type find_last_of (const charT* s, size_type pos = npos) const;
|
1308 |
|
|
V size_type find_last_of (charT c, size_type pos = npos) const;
|
1309 |
|
|
V size_type find_first_not_of(const basic_string& str,
|
1310 |
|
|
size_type pos = 0) const;
|
1311 |
|
|
V size_type find_first_not_of(const charT* s, size_type pos,
|
1312 |
|
|
size_type n) const;
|
1313 |
|
|
V size_type find_first_not_of(const charT* s, size_type pos = 0) const;
|
1314 |
|
|
V size_type find_first_not_of(charT c, size_type pos = 0) const;
|
1315 |
|
|
V size_type find_last_not_of (const basic_string& str,
|
1316 |
|
|
size_type pos = npos) const;
|
1317 |
|
|
V size_type find_last_not_of (const charT* s, size_type pos,
|
1318 |
|
|
size_type n) const;
|
1319 |
|
|
V size_type find_last_not_of (const charT* s,
|
1320 |
|
|
size_type pos = npos) const;
|
1321 |
|
|
V size_type find_last_not_of (charT c, size_type pos = npos) const;
|
1322 |
|
|
V basic_string substr(size_type pos = 0, size_type n = npos) const;
|
1323 |
|
|
V int compare(const basic_string& str) const;
|
1324 |
|
|
V int compare(size_type pos1, size_type n1,
|
1325 |
|
|
const basic_string& str) const;
|
1326 |
|
|
V int compare(size_type pos1, size_type n1,
|
1327 |
|
|
const basic_string& str,
|
1328 |
|
|
size_type pos2, size_type n2) const;
|
1329 |
|
|
V int compare(const charT* s) const;
|
1330 |
|
|
V int compare(size_type pos1, size_type n1,
|
1331 |
|
|
const charT* s, size_type n2 = npos) const;
|
1332 |
|
|
};
|
1333 |
|
|
}
|
1334 |
|
|
|
1335 |
|
|
21.4 Null-terminated sequence utilities [lib.c.strings]
|
1336 |
|
|
|
1337 |
|
|
Table 10--Header synopsis
|
1338 |
|
|
|
1339 |
|
|
isalnum isdigit isprint isupper tolower
|
1340 |
|
|
X isalpha isgraph ispunct isxdigit toupper
|
1341 |
|
|
iscntrl islower isspace
|
1342 |
|
|
|
1343 |
|
|
Table 11--Header synopsis
|
1344 |
|
|
|
1345 |
|
|
X Macro: WEOF
|
1346 |
|
|
X Types: wctrans_t wctype_t wint_t
|
1347 |
|
|
Functions:
|
1348 |
|
|
X iswalnum iswctype iswlower iswspace towctrans wctrans
|
1349 |
|
|
X iswalpha iswdigit iswprint iswupper towlower wctype
|
1350 |
|
|
X iswcntrl iswgraph iswpunct iswxdigit towupper
|
1351 |
|
|
|
1352 |
|
|
Table 12--Header synopsis
|
1353 |
|
|
|
1354 |
|
|
X Macro: NULL
|
1355 |
|
|
X Type: size_t
|
1356 |
|
|
Functions:
|
1357 |
|
|
X memchr strcat strcspn strncpy strtok
|
1358 |
|
|
X memcmp strchr strerror strpbrk strxfrm
|
1359 |
|
|
X memcpy strcmp strlen strrchr
|
1360 |
|
|
X memmove strcoll strncat strspn
|
1361 |
|
|
X memset strcpy strncmp strstr
|
1362 |
|
|
|
1363 |
|
|
Table 13--Header synopsis
|
1364 |
|
|
Macros: NULL WCHAR_MAX WCHAR_MIN WEOF
|
1365 |
|
|
Types: mbstate_t wint_t size_t
|
1366 |
|
|
Functions:
|
1367 |
|
|
X btowc getwchar ungetwc wcscpy wcsrtombs wmemchr
|
1368 |
|
|
X fgetwc mbrlen vfwprintf wcscspn wcsspn wmemcmp
|
1369 |
|
|
X fgetws mbrtowc vswprintf wcsftime wcsstr wmemcpy
|
1370 |
|
|
X fputwc mbsinit vwprintf wcslen wcstod wmemmove
|
1371 |
|
|
X fputws mbsrtowcs wcrtomb wcsncat wcstok wmemset
|
1372 |
|
|
X fwide putwc wcscat wcsncmp wcstol wprintf
|
1373 |
|
|
X fwprintf putwchar wcschr wcsncpy wcstoul wscanf
|
1374 |
|
|
X fwscanf swprintf wcscmp wcspbrk wcsxfrm
|
1375 |
|
|
X getwc swscanf wcscoll wcsrchr wctob
|
1376 |
|
|
|
1377 |
|
|
Table 14--Header synopsis
|
1378 |
|
|
|
1379 |
|
|
Macros: MB_CUR_MAX
|
1380 |
|
|
Functions:
|
1381 |
|
|
X atol mblen strtod wctomb
|
1382 |
|
|
X atof mbstowcs strtol wcstombs
|
1383 |
|
|
X atoi mbtowc strtoul
|
1384 |
|
|
|
1385 |
|
|
X const char* strchr(const char* s, int c);
|
1386 |
|
|
X char* strchr( char* s, int c);
|
1387 |
|
|
|
1388 |
|
|
X const char* strpbrk(const char* s1, const char* s2);
|
1389 |
|
|
X char* strpbrk( char* s1, const char* s2);
|
1390 |
|
|
|
1391 |
|
|
X const char* strrchr(const char* s, int c);
|
1392 |
|
|
X char* strrchr( char* s, int c);
|
1393 |
|
|
|
1394 |
|
|
X const char* strstr(const char* s1, const char* s2);
|
1395 |
|
|
X char* strstr( char* s1, const char* s2);
|
1396 |
|
|
|
1397 |
|
|
X const void* memchr(const void* s, int c, size_t n);
|
1398 |
|
|
X void* memchr( void* s, int c, size_t n);
|
1399 |
|
|
|
1400 |
|
|
X const wchar_t* wcschr(const wchar_t* s, wchar_t c);
|
1401 |
|
|
X wchar_t* wcschr( wchar_t* s, wchar_t c);
|
1402 |
|
|
|
1403 |
|
|
X const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2);
|
1404 |
|
|
X wchar_t* wcspbrk( wchar_t* s1, const wchar_t* s2);
|
1405 |
|
|
|
1406 |
|
|
X const wchar_t* wcsrchr(const wchar_t* s, wchar_t c);
|
1407 |
|
|
X wchar_t* wcsrchr( wchar_t* s, wchar_t c);
|
1408 |
|
|
|
1409 |
|
|
X const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2);
|
1410 |
|
|
X wchar_t* wcsstr( wchar_t* s1, const wchar_t* s2);
|
1411 |
|
|
|
1412 |
|
|
X const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
|
1413 |
|
|
X wchar_t* wmemchr( wchar_t* s, wchar_t c, size_t n);
|
1414 |
|
|
|
1415 |
|
|
[for initial efforts on the above, see shadow/string.h]
|
1416 |
|
|
|
1417 |
|
|
22.1 Locales [lib.locales]
|
1418 |
|
|
|
1419 |
|
|
Header synopsis
|
1420 |
|
|
|
1421 |
|
|
// _lib.locale_, locale:
|
1422 |
|
|
T class locale;
|
1423 |
|
|
T template const Facet& use_facet(const locale&);
|
1424 |
|
|
T template bool has_facet(const locale&) throw();
|
1425 |
|
|
|
1426 |
|
|
// _lib.locale.convenience_, convenience interfaces:
|
1427 |
|
|
T template bool isspace (charT c, const locale& loc);
|
1428 |
|
|
T template bool isprint (charT c, const locale& loc);
|
1429 |
|
|
T template bool iscntrl (charT c, const locale& loc);
|
1430 |
|
|
T template bool isupper (charT c, const locale& loc);
|
1431 |
|
|
T template bool islower (charT c, const locale& loc);
|
1432 |
|
|
T template bool isalpha (charT c, const locale& loc);
|
1433 |
|
|
T template bool isdigit (charT c, const locale& loc);
|
1434 |
|
|
T template bool ispunct (charT c, const locale& loc);
|
1435 |
|
|
T template bool isxdigit(charT c, const locale& loc);
|
1436 |
|
|
T template bool isalnum (charT c, const locale& loc);
|
1437 |
|
|
T template bool isgraph (charT c, const locale& loc);
|
1438 |
|
|
T template charT toupper(charT c, const locale& loc);
|
1439 |
|
|
T template charT tolower(charT c, const locale& loc);
|
1440 |
|
|
// _lib.category.ctype_ and _lib.facet.ctype.special_, ctype:
|
1441 |
|
|
class ctype_base;
|
1442 |
|
|
T template class ctype;
|
1443 |
|
|
T template <> class ctype; // specialization
|
1444 |
|
|
S template class ctype_byname;
|
1445 |
|
|
S template <> class ctype_byname; // specialization
|
1446 |
|
|
T class codecvt_base;
|
1447 |
|
|
X template class codecvt;
|
1448 |
|
|
S template class codecvt_byname;
|
1449 |
|
|
// _lib.category.numeric_ and _lib.facet.numpunct_, numeric:
|
1450 |
|
|
X template class num_get;
|
1451 |
|
|
X template class num_put;
|
1452 |
|
|
T template class numpunct;
|
1453 |
|
|
S template class numpunct_byname;
|
1454 |
|
|
// _lib.category.collate_, collation:
|
1455 |
|
|
T template class collate;
|
1456 |
|
|
S template class collate_byname;
|
1457 |
|
|
// _lib.category.time_, date and time:
|
1458 |
|
|
T class time_base;
|
1459 |
|
|
S template class time_get;
|
1460 |
|
|
S template class time_get_byname;
|
1461 |
|
|
S template class time_put;
|
1462 |
|
|
S template class time_put_byname;
|
1463 |
|
|
// _lib.category.monetary_, money:
|
1464 |
|
|
T class money_base;
|
1465 |
|
|
S template class money_get;
|
1466 |
|
|
S template class money_put;
|
1467 |
|
|
S template class moneypunct;
|
1468 |
|
|
S template class moneypunct_byname;
|
1469 |
|
|
// _lib.category.messages_, message retrieval:
|
1470 |
|
|
T class messages_base;
|
1471 |
|
|
S template class messages;
|
1472 |
|
|
S template class messages_byname;
|
1473 |
|
|
|
1474 |
|
|
|
1475 |
|
|
22.1.1 Class locale [lib.locale]
|
1476 |
|
|
|
1477 |
|
|
X class locale {
|
1478 |
|
|
public:
|
1479 |
|
|
// types:
|
1480 |
|
|
T class facet;
|
1481 |
|
|
T class id;
|
1482 |
|
|
T typedef int category;
|
1483 |
|
|
T static const category // values assigned here are for exposition only
|
1484 |
|
|
T none = 0,
|
1485 |
|
|
T collate = 0x010, ctype = 0x020,
|
1486 |
|
|
T monetary = 0x040, numeric = 0x080,
|
1487 |
|
|
T time = 0x100, messages = 0x200,
|
1488 |
|
|
T all = collate | ctype | monetary | numeric | time | messages;
|
1489 |
|
|
// construct/copy/destroy:
|
1490 |
|
|
T locale() throw()
|
1491 |
|
|
T locale(const locale& other) throw()
|
1492 |
|
|
X explicit locale(const char* std_name);
|
1493 |
|
|
X locale(const locale& other, const char* std_name, category);
|
1494 |
|
|
T template locale(const locale& other, Facet* f);
|
1495 |
|
|
T locale(const locale& other, const locale& one, category);
|
1496 |
|
|
T ~locale() throw(); // non-virtual
|
1497 |
|
|
T const locale& operator=(const locale& other) throw();
|
1498 |
|
|
T template locale combine(const locale& other) const;
|
1499 |
|
|
// locale operations:
|
1500 |
|
|
X basic_string name() const;
|
1501 |
|
|
T bool operator==(const locale& other) const;
|
1502 |
|
|
T bool operator!=(const locale& other) const;
|
1503 |
|
|
T template
|
1504 |
|
|
bool operator()(const basic_string& s1,
|
1505 |
|
|
const basic_string& s2) const;
|
1506 |
|
|
// global locale objects:
|
1507 |
|
|
T static locale global(const locale&);
|
1508 |
|
|
T static const locale& classic();
|
1509 |
|
|
};
|
1510 |
|
|
|
1511 |
|
|
22.1.1.1 locale types [lib.locale.types]
|
1512 |
|
|
|
1513 |
|
|
22.1.1.1.1 Type locale::category [lib.locale.category]
|
1514 |
|
|
|
1515 |
|
|
T typedef int category;
|
1516 |
|
|
|
1517 |
|
|
T none, collate, ctype, monetary, numeric, time, and messages
|
1518 |
|
|
|
1519 |
|
|
[required locale members]
|
1520 |
|
|
T collate, collate
|
1521 |
|
|
T ctype, ctype
|
1522 |
|
|
T codecvt,
|
1523 |
|
|
S codecvt
|
1524 |
|
|
T moneypunct, moneypunct
|
1525 |
|
|
T moneypunct, moneypunct,
|
1526 |
|
|
S money_get, money_get
|
1527 |
|
|
S money_put, money_put
|
1528 |
|
|
T numpunct, numpunct,
|
1529 |
|
|
X num_get, num_get
|
1530 |
|
|
X num_put, num_put
|
1531 |
|
|
S time_get, time_get,
|
1532 |
|
|
S time_put, time_put
|
1533 |
|
|
S messages, messages
|
1534 |
|
|
|
1535 |
|
|
[required instantiations]
|
1536 |
|
|
S collate_byname, collate_byname
|
1537 |
|
|
S ctype_byname, ctype_byname
|
1538 |
|
|
S codecvt_byname,
|
1539 |
|
|
S codecvt_byname
|
1540 |
|
|
S moneypunct_byname,
|
1541 |
|
|
S moneypunct_byname,
|
1542 |
|
|
S money_get,
|
1543 |
|
|
S money_put
|
1544 |
|
|
S numpunct_byname, numpunct_byname
|
1545 |
|
|
X num_get, num_put
|
1546 |
|
|
S time_get,
|
1547 |
|
|
S time_get_byname,
|
1548 |
|
|
S time_get,
|
1549 |
|
|
S time_get_byname,
|
1550 |
|
|
S time_put,
|
1551 |
|
|
S time_put_byname,
|
1552 |
|
|
S time_put
|
1553 |
|
|
S time_put_byname
|
1554 |
|
|
S messages_byname, messages_byname
|
1555 |
|
|
|
1556 |
|
|
|
1557 |
|
|
22.1.1.1.2 Class locale::facet [lib.locale.facet]
|
1558 |
|
|
|
1559 |
|
|
T class locale::facet {
|
1560 |
|
|
protected:
|
1561 |
|
|
T explicit facet(size_t refs = 0);
|
1562 |
|
|
T virtual ~facet();
|
1563 |
|
|
private:
|
1564 |
|
|
T facet(const facet&); // not defined
|
1565 |
|
|
T void operator=(const facet&); // not defined
|
1566 |
|
|
};
|
1567 |
|
|
}
|
1568 |
|
|
|
1569 |
|
|
|
1570 |
|
|
22.1.1.1.3 Class locale::id [lib.locale.id]
|
1571 |
|
|
|
1572 |
|
|
T class locale::id {
|
1573 |
|
|
public:
|
1574 |
|
|
T id();
|
1575 |
|
|
private:
|
1576 |
|
|
T void operator=(const id&); // not defined
|
1577 |
|
|
T id(const id&); // not defined
|
1578 |
|
|
};
|
1579 |
|
|
}
|
1580 |
|
|
|
1581 |
|
|
|
1582 |
|
|
22.2.1 The ctype category [lib.category.ctype]
|
1583 |
|
|
|
1584 |
|
|
T class ctype_base {
|
1585 |
|
|
public:
|
1586 |
|
|
T enum mask { // numeric values are for exposition only.
|
1587 |
|
|
T space=, print=, cntrl=, upper=, lower=,
|
1588 |
|
|
T alpha=, digit=, punct=, xdigit=,
|
1589 |
|
|
T alnum=, graph=
|
1590 |
|
|
};
|
1591 |
|
|
};
|
1592 |
|
|
|
1593 |
|
|
|
1594 |
|
|
22.2.1.1 Template class ctype [lib.locale.ctype]
|
1595 |
|
|
|
1596 |
|
|
T template
|
1597 |
|
|
class ctype : public locale::facet, public ctype_base {
|
1598 |
|
|
public:
|
1599 |
|
|
T typedef charT char_type;
|
1600 |
|
|
T explicit ctype(size_t refs = 0);
|
1601 |
|
|
T bool is(mask m, charT c) const;
|
1602 |
|
|
T const charT* is(const charT* low, const charT* high, mask* vec) const;
|
1603 |
|
|
T const charT* scan_is(mask m,
|
1604 |
|
|
const charT* low, const charT* high) const;
|
1605 |
|
|
T const charT* scan_not(mask m,
|
1606 |
|
|
const charT* low, const charT* high) const;
|
1607 |
|
|
T charT toupper(charT c) const;
|
1608 |
|
|
T const charT* toupper(charT* low, const charT* high) const;
|
1609 |
|
|
T charT tolower(charT c) const;
|
1610 |
|
|
T const charT* tolower(charT* low, const charT* high) const;
|
1611 |
|
|
T charT widen(char c) const;
|
1612 |
|
|
T const char* widen(const char* low, const char* high, charT* to) const;
|
1613 |
|
|
T char narrow(charT c, char dfault) const;
|
1614 |
|
|
T const charT* narrow(const charT* low, const charT*, char dfault,
|
1615 |
|
|
char* to) const;
|
1616 |
|
|
T static locale::id id;
|
1617 |
|
|
|
1618 |
|
|
protected:
|
1619 |
|
|
T ~ctype(); // virtual
|
1620 |
|
|
T virtual bool do_is(mask m, charT c) const;
|
1621 |
|
|
T virtual const charT* do_is(const charT* low, const charT* high,
|
1622 |
|
|
mask* vec) const;
|
1623 |
|
|
T virtual const charT* do_scan_is(mask m,
|
1624 |
|
|
const charT* low, const charT* high) const;
|
1625 |
|
|
T virtual const charT* do_scan_not(mask m,
|
1626 |
|
|
const charT* low, const charT* high) const;
|
1627 |
|
|
T virtual charT do_toupper(charT) const;
|
1628 |
|
|
T virtual const charT* do_toupper(charT* low, const charT* high) const;
|
1629 |
|
|
T virtual charT do_tolower(charT) const;
|
1630 |
|
|
T virtual const charT* do_tolower(charT* low, const charT* high) const;
|
1631 |
|
|
T virtual charT do_widen(char) const;
|
1632 |
|
|
T virtual const char* do_widen(const char* low, const char* high,
|
1633 |
|
|
charT* dest) const;
|
1634 |
|
|
T virtual char do_narrow(charT, char dfault) const;
|
1635 |
|
|
T virtual const charT* do_narrow(const charT* low, const charT* high,
|
1636 |
|
|
char dfault, char* dest) const;
|
1637 |
|
|
};
|
1638 |
|
|
|
1639 |
|
|
|
1640 |
|
|
22.2.1.2 Template class ctype_byname [lib.locale.ctype.byname]
|
1641 |
|
|
|
1642 |
|
|
X template
|
1643 |
|
|
class ctype_byname : public ctype {
|
1644 |
|
|
public:
|
1645 |
|
|
T typedef ctype::mask mask;
|
1646 |
|
|
S explicit ctype_byname(const char*, size_t refs = 0);
|
1647 |
|
|
protected:
|
1648 |
|
|
S ~ctype_byname(); // virtual
|
1649 |
|
|
S virtual bool do_is(mask m, charT c) const;
|
1650 |
|
|
S virtual const charT* do_is(const charT* low, const charT* high,
|
1651 |
|
|
mask* vec) const;
|
1652 |
|
|
S virtual const char* do_scan_is(mask m,
|
1653 |
|
|
const charT* low, const charT* high) const;
|
1654 |
|
|
S virtual const char* do_scan_not(mask m,
|
1655 |
|
|
const charT* low, const charT* high) const;
|
1656 |
|
|
S virtual charT do_toupper(charT) const;
|
1657 |
|
|
S virtual const charT* do_toupper(charT* low, const charT* high) const;
|
1658 |
|
|
S virtual charT do_tolower(charT) const;
|
1659 |
|
|
S virtual const charT* do_tolower(charT* low, const charT* high) const;
|
1660 |
|
|
S virtual charT do_widen(char) const;
|
1661 |
|
|
S virtual const char* do_widen(const char* low, const char* high,
|
1662 |
|
|
charT* dest) const;
|
1663 |
|
|
S virtual char do_narrow(charT, char dfault) const;
|
1664 |
|
|
S virtual const charT* do_narrow(const charT* low, const charT* high,
|
1665 |
|
|
char dfault, char* dest) const;
|
1666 |
|
|
};
|
1667 |
|
|
|
1668 |
|
|
22.2.1.3 ctype specializations [lib.facet.ctype.special]
|
1669 |
|
|
|
1670 |
|
|
T template <> class ctype
|
1671 |
|
|
: public locale::facet, public ctype_base {
|
1672 |
|
|
public:
|
1673 |
|
|
T typedef char char_type;
|
1674 |
|
|
T explicit ctype(const mask* tab = 0, bool del = false,
|
1675 |
|
|
size_t refs = 0);
|
1676 |
|
|
T bool is(mask m, char c) const;
|
1677 |
|
|
T const char* is(const char* low, const char* high, mask* vec) const;
|
1678 |
|
|
T const char* scan_is (mask m,
|
1679 |
|
|
const char* low, const char* high) const;
|
1680 |
|
|
T const char* scan_not(mask m,
|
1681 |
|
|
const char* low, const char* high) const;
|
1682 |
|
|
T char toupper(char c) const;
|
1683 |
|
|
T const char* toupper(char* low, const char* high) const;
|
1684 |
|
|
T char tolower(char c) const;
|
1685 |
|
|
T const char* tolower(char* low, const char* high) const;
|
1686 |
|
|
T char widen(char c) const;
|
1687 |
|
|
T const char* widen(const char* low, const char* high, char* to) const;
|
1688 |
|
|
T char narrow(char c, char dfault) const;
|
1689 |
|
|
T const char* narrow(const char* low, const char* high, char dfault,
|
1690 |
|
|
char* to) const;
|
1691 |
|
|
T static locale::id id;
|
1692 |
|
|
T static const size_t table_size = IMPLEMENTATION_DEFINED;
|
1693 |
|
|
|
1694 |
|
|
protected:
|
1695 |
|
|
T const mask* table() const throw();
|
1696 |
|
|
T static const mask* classic_table() throw();
|
1697 |
|
|
T ~ctype(); // virtual
|
1698 |
|
|
T virtual char do_toupper(char c) const;
|
1699 |
|
|
T virtual const char* do_toupper(char* low, const char* high) const;
|
1700 |
|
|
T virtual char do_tolower(char c) const;
|
1701 |
|
|
T virtual const char* do_tolower(char* low, const char* high) const;
|
1702 |
|
|
|
1703 |
|
|
T virtual char do_widen(char c) const;
|
1704 |
|
|
T virtual const char* do_widen(const char* low,
|
1705 |
|
|
const char* high,
|
1706 |
|
|
char* to) const;
|
1707 |
|
|
T virtual char do_narrow(char c, char dfault) const;
|
1708 |
|
|
T virtual const char* do_narrow(const char* low,
|
1709 |
|
|
const char* high,
|
1710 |
|
|
char dfault, char* to) const;
|
1711 |
|
|
};
|
1712 |
|
|
|
1713 |
|
|
|
1714 |
|
|
22.2.1.4 Class [lib.locale.ctype.byname.special]
|
1715 |
|
|
ctype_byname
|
1716 |
|
|
|
1717 |
|
|
X template <> class ctype_byname : public ctype {
|
1718 |
|
|
public:
|
1719 |
|
|
S explicit ctype_byname(const char*, size_t refs = 0);
|
1720 |
|
|
protected:
|
1721 |
|
|
S ~ctype_byname(); // virtual
|
1722 |
|
|
S virtual char do_toupper(char c) const;
|
1723 |
|
|
S virtual const char* do_toupper(char* low, const char* high) const;
|
1724 |
|
|
S virtual char do_tolower(char c) const;
|
1725 |
|
|
S virtual const char* do_tolower(char* low, const char* high) const;
|
1726 |
|
|
|
1727 |
|
|
S virtual char do_widen(char c) const;
|
1728 |
|
|
S virtual const char* do_widen(char* low,
|
1729 |
|
|
const char* high,
|
1730 |
|
|
char* to) const;
|
1731 |
|
|
S virtual char do_widen(char c) const;
|
1732 |
|
|
S virtual const char* do_widen(char* low, const char* high) const;
|
1733 |
|
|
|
1734 |
|
|
};
|
1735 |
|
|
|
1736 |
|
|
|
1737 |
|
|
|
1738 |
|
|
22.2.1.5 Template class codecvt [lib.locale.codecvt]
|
1739 |
|
|
|
1740 |
|
|
T class codecvt_base {
|
1741 |
|
|
public:
|
1742 |
|
|
T enum result { ok, partial, error, noconv };
|
1743 |
|
|
};
|
1744 |
|
|
|
1745 |
|
|
T template
|
1746 |
|
|
class codecvt : public locale::facet, public codecvt_base {
|
1747 |
|
|
public:
|
1748 |
|
|
T typedef internT intern_type;
|
1749 |
|
|
T typedef externT extern_type;
|
1750 |
|
|
T typedef stateT state_type;
|
1751 |
|
|
T explicit codecvt(size_t refs = 0)
|
1752 |
|
|
T result out(stateT& state,
|
1753 |
|
|
const internT* from, const internT* from_end, const internT*& from_next,
|
1754 |
|
|
externT* to, externT* to_limit, externT*& to_next) const;
|
1755 |
|
|
T result unshift(stateT& state,
|
1756 |
|
|
externT* to, externT* to_limit, externT*& to_next) const;
|
1757 |
|
|
T result in(stateT& state,
|
1758 |
|
|
const externT* from, const externT* from_end, const externT*& from_next,
|
1759 |
|
|
internT* to, internT* to_limit, internT*& to_next) const;
|
1760 |
|
|
T int encoding() const throw();
|
1761 |
|
|
T bool always_noconv() const throw();
|
1762 |
|
|
T int length(const stateT&, const externT* from, const externT* end,
|
1763 |
|
|
size_t max) const;
|
1764 |
|
|
T int max_length() const throw();
|
1765 |
|
|
T static locale::id id;
|
1766 |
|
|
|
1767 |
|
|
protected:
|
1768 |
|
|
T ~codecvt(); // virtual
|
1769 |
|
|
T virtual result do_out(stateT& state,
|
1770 |
|
|
const internT* from, const internT* from_end, const internT*& from_next,
|
1771 |
|
|
externT* to, externT* to_limit, externT*& to_next) const;
|
1772 |
|
|
T virtual result do_in(stateT& state,
|
1773 |
|
|
T const externT* from, const externT* from_end, const externT*& from_next,
|
1774 |
|
|
internT* to, internT* to_limit, internT*& to_next) const;
|
1775 |
|
|
T virtual result do_unshift(stateT& state,
|
1776 |
|
|
externT* to, externT* to_limit, externT*& to_next) const;
|
1777 |
|
|
T virtual int do_encoding() const throw();
|
1778 |
|
|
T virtual bool do_always_noconv() const throw();
|
1779 |
|
|
T virtual int do_length(const stateT&, const externT* from,
|
1780 |
|
|
const externT* end, size_t max) const;
|
1781 |
|
|
T virtual int do_max_length() const throw();
|
1782 |
|
|
};
|
1783 |
|
|
}
|
1784 |
|
|
|
1785 |
|
|
|
1786 |
|
|
22.2.1.6 Template class [lib.locale.codecvt.byname]
|
1787 |
|
|
codecvt_byname
|
1788 |
|
|
|
1789 |
|
|
X template
|
1790 |
|
|
class codecvt_byname : public codecvt {
|
1791 |
|
|
public:
|
1792 |
|
|
S explicit codecvt_byname(const char*, size_t refs = 0);
|
1793 |
|
|
protected:
|
1794 |
|
|
S ~codecvt_byname(); // virtual
|
1795 |
|
|
S virtual result do_out(stateT& state,
|
1796 |
|
|
const internT* from, const internT* from_end, const internT*& from_next,
|
1797 |
|
|
externT* to, externT* to_limit, externT*& to_next) const;
|
1798 |
|
|
S virtual result do_in(stateT& state,
|
1799 |
|
|
const externT* from, const externT* from_end, const externT*& from_next,
|
1800 |
|
|
internT* to, internT* to_limit, internT*& to_next) const;
|
1801 |
|
|
S virtual result do_unshift(stateT& state,
|
1802 |
|
|
externT* to, externT* to_limit, externT*& to_next) const;
|
1803 |
|
|
S virtual int do_encoding() const throw();
|
1804 |
|
|
S virtual bool do_always_noconv() const throw();
|
1805 |
|
|
S virtual int do_length(const stateT&, const externT* from,
|
1806 |
|
|
const externT* end, size_t max) const;
|
1807 |
|
|
S virtual result do_unshift(stateT& state,
|
1808 |
|
|
externT* to, externT* to_limit, externT*& to_next) const;
|
1809 |
|
|
S virtual int do_max_length() const throw();
|
1810 |
|
|
};
|
1811 |
|
|
|
1812 |
|
|
|
1813 |
|
|
22.2.2.1 Template class num_get [lib.locale.num.get]
|
1814 |
|
|
|
1815 |
|
|
X template >
|
1816 |
|
|
class num_get : public locale::facet {
|
1817 |
|
|
public:
|
1818 |
|
|
T typedef charT char_type;
|
1819 |
|
|
T typedef InputIterator iter_type;
|
1820 |
|
|
T explicit num_get(size_t refs = 0);
|
1821 |
|
|
T iter_type get(iter_type in, iter_type end, ios_base&,
|
1822 |
|
|
ios_base::iostate& err, bool& v) const;
|
1823 |
|
|
T iter_type get(iter_type in, iter_type end, ios_base& ,
|
1824 |
|
|
ios_base::iostate& err, long& v) const;
|
1825 |
|
|
T iter_type get(iter_type in, iter_type end, ios_base&,
|
1826 |
|
|
ios_base::iostate& err, unsigned short& v) const;
|
1827 |
|
|
T iter_type get(iter_type in, iter_type end, ios_base&,
|
1828 |
|
|
ios_base::iostate& err, unsigned int& v) const;
|
1829 |
|
|
T iter_type get(iter_type in, iter_type end, ios_base&,
|
1830 |
|
|
ios_base::iostate& err, unsigned long& v) const;
|
1831 |
|
|
T iter_type get(iter_type in, iter_type end, ios_base&,
|
1832 |
|
|
ios_base::iostate& err, float& v) const;
|
1833 |
|
|
T iter_type get(iter_type in, iter_type end, ios_base&,
|
1834 |
|
|
ios_base::iostate& err, double& v) const;
|
1835 |
|
|
T iter_type get(iter_type in, iter_type end, ios_base&,
|
1836 |
|
|
ios_base::iostate& err, long double& v) const;
|
1837 |
|
|
T iter_type get(iter_type in, iter_type end, ios_base&,
|
1838 |
|
|
ios_base::iostate& err, void*& v) const;
|
1839 |
|
|
T static locale::id id;
|
1840 |
|
|
|
1841 |
|
|
protected:
|
1842 |
|
|
T ~num_get(); // virtual
|
1843 |
|
|
T virtual iter_type do_get(iter_type, iter_type, ios_base&,
|
1844 |
|
|
ios_base::iostate& err, bool& v) const;
|
1845 |
|
|
S virtual iter_type do_get(iter_type, iter_type, ios_base&,
|
1846 |
|
|
ios_base::iostate& err, long& v) const;
|
1847 |
|
|
S virtual iter_type do_get(iter_type, iter_type, ios_base&,
|
1848 |
|
|
ios_base::iostate& err, unsigned short& v) const;
|
1849 |
|
|
S virtual iter_type do_get(iter_type, iter_type, ios_base&,
|
1850 |
|
|
ios_base::iostate& err, unsigned int& v) const;
|
1851 |
|
|
S virtual iter_type do_get(iter_type, iter_type, ios_base&,
|
1852 |
|
|
ios_base::iostate& err, unsigned long& v) const;
|
1853 |
|
|
S virtual iter_type do_get(iter_type, iter_type, ios_base&,
|
1854 |
|
|
ios_base::iostate& err, float& v) const;
|
1855 |
|
|
S virtual iter_type do_get(iter_type, iter_type, ios_base&,
|
1856 |
|
|
ios_base::iostate& err, double& v) const;
|
1857 |
|
|
S virtual iter_type do_get(iter_type, iter_type, ios_base&,
|
1858 |
|
|
ios_base::iostate& err, long double& v) const;
|
1859 |
|
|
S virtual iter_type do_get(iter_type, iter_type, ios_base&,
|
1860 |
|
|
ios_base::iostate& err, void*& v) const;
|
1861 |
|
|
};
|
1862 |
|
|
|
1863 |
|
|
|
1864 |
|
|
|
1865 |
|
|
22.2.2.2 Template class num_put [lib.locale.nm.put]
|
1866 |
|
|
|
1867 |
|
|
X template >
|
1868 |
|
|
class num_put : public locale::facet {
|
1869 |
|
|
public:
|
1870 |
|
|
T typedef charT char_type;
|
1871 |
|
|
T typedef OutputIterator iter_type;
|
1872 |
|
|
T explicit num_put(size_t refs = 0);
|
1873 |
|
|
T iter_type put(iter_type s, ios_base& f, char_type fill, bool v) const;
|
1874 |
|
|
T iter_type put(iter_type s, ios_base& f, char_type fill, long v) const;
|
1875 |
|
|
T iter_type put(iter_type s, ios_base& f, char_type fill,
|
1876 |
|
|
unsigned long v) const;
|
1877 |
|
|
T iter_type put(iter_type s, ios_base& f, char_type fill,
|
1878 |
|
|
double v) const;
|
1879 |
|
|
T iter_type put(iter_type s, ios_base& f, char_type fill,
|
1880 |
|
|
long double v) const;
|
1881 |
|
|
T iter_type put(iter_type s, ios_base& f, char_type fill,
|
1882 |
|
|
const void* v) const;
|
1883 |
|
|
T static locale::id id;
|
1884 |
|
|
protected:
|
1885 |
|
|
T ~num_put(); // virtual
|
1886 |
|
|
T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
|
1887 |
|
|
bool v) const;
|
1888 |
|
|
T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
|
1889 |
|
|
long v) const;
|
1890 |
|
|
T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
|
1891 |
|
|
unsigned long) const;
|
1892 |
|
|
S virtual iter_type do_put(iter_type, ios_base&, char_type fill,
|
1893 |
|
|
double v) const;
|
1894 |
|
|
S virtual iter_type do_put(iter_type, ios_base&, char_type fill,
|
1895 |
|
|
long double v) const;
|
1896 |
|
|
T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
|
1897 |
|
|
const void* v) const;
|
1898 |
|
|
};
|
1899 |
|
|
}
|
1900 |
|
|
|
1901 |
|
|
22.2.3.1 Template class numpunct [lib.locale.numpunct]
|
1902 |
|
|
|
1903 |
|
|
T template
|
1904 |
|
|
class numpunct : public locale::facet {
|
1905 |
|
|
public:
|
1906 |
|
|
T typedef charT char_type;
|
1907 |
|
|
T typedef basic_string string_type;
|
1908 |
|
|
T explicit numpunct(size_t refs = 0);
|
1909 |
|
|
T char_type decimal_point() const;
|
1910 |
|
|
T char_type thousands_sep() const;
|
1911 |
|
|
T string grouping() const;
|
1912 |
|
|
T string_type truename() const;
|
1913 |
|
|
T string_type falsename() const;
|
1914 |
|
|
T static locale::id id;
|
1915 |
|
|
protected:
|
1916 |
|
|
T ~numpunct(); // virtual
|
1917 |
|
|
T virtual char_type do_decimal_point() const;
|
1918 |
|
|
T virtual char_type do_thousands_sep() const;
|
1919 |
|
|
T virtual string do_grouping() const;
|
1920 |
|
|
T virtual string_type do_truename() const; // for bool
|
1921 |
|
|
T virtual string_type do_falsename() const; // for bool
|
1922 |
|
|
};
|
1923 |
|
|
}
|
1924 |
|
|
|
1925 |
|
|
|
1926 |
|
|
|
1927 |
|
|
22.2.3.2 Template class [lib.locale.numpunct.byname]
|
1928 |
|
|
numpunct_byname
|
1929 |
|
|
|
1930 |
|
|
X template
|
1931 |
|
|
class numpunct_byname : public numpunct {
|
1932 |
|
|
// this class is specialized for char and wchar_t.
|
1933 |
|
|
public:
|
1934 |
|
|
T typedef charT char_type;
|
1935 |
|
|
T typedef basic_string string_type;
|
1936 |
|
|
S explicit numpunct_byname(const char*, size_t refs = 0);
|
1937 |
|
|
protected:
|
1938 |
|
|
S ~numpunct_byname(); // virtual
|
1939 |
|
|
S virtual char_type do_decimal_point() const;
|
1940 |
|
|
S virtual char_type do_thousands_sep() const;
|
1941 |
|
|
S virtual string do_grouping() const;
|
1942 |
|
|
S virtual string_type do_truename() const; // for bool
|
1943 |
|
|
S virtual string_type do_falsename() const; // for bool
|
1944 |
|
|
};
|
1945 |
|
|
|
1946 |
|
|
|
1947 |
|
|
22.2.4.1 Template class collate [lib.locale.collate]
|
1948 |
|
|
|
1949 |
|
|
T template
|
1950 |
|
|
class collate : public locale::facet {
|
1951 |
|
|
public:
|
1952 |
|
|
T typedef charT char_type;
|
1953 |
|
|
T typedef basic_string string_type;
|
1954 |
|
|
T explicit collate(size_t refs = 0);
|
1955 |
|
|
T int compare(const charT* low1, const charT* high1,
|
1956 |
|
|
const charT* low2, const charT* high2) const;
|
1957 |
|
|
T string_type transform(const charT* low, const charT* high) const;
|
1958 |
|
|
T long hash(const charT* low, const charT* high) const;
|
1959 |
|
|
T static locale::id id;
|
1960 |
|
|
protected:
|
1961 |
|
|
T ~collate(); // virtual
|
1962 |
|
|
T virtual int do_compare(const charT* low1, const charT* high1,
|
1963 |
|
|
const charT* low2, const charT* high2) const;
|
1964 |
|
|
T virtual string_type do_transform
|
1965 |
|
|
(const charT* low, const charT* high) const;
|
1966 |
|
|
T virtual long do_hash (const charT* low, const charT* high) const;
|
1967 |
|
|
};
|
1968 |
|
|
|
1969 |
|
|
|
1970 |
|
|
22.2.4.2 Template class [lib.locale.collate.byname]
|
1971 |
|
|
collate_byname
|
1972 |
|
|
|
1973 |
|
|
X template
|
1974 |
|
|
class collate_byname : public collate {
|
1975 |
|
|
public:
|
1976 |
|
|
T typedef basic_string string_type;
|
1977 |
|
|
T explicit collate_byname(const char*, size_t refs = 0);
|
1978 |
|
|
protected:
|
1979 |
|
|
S ~collate_byname(); // virtual
|
1980 |
|
|
S virtual int do_compare(const charT* low1, const charT* high1,
|
1981 |
|
|
const charT* low2, const charT* high2) const;
|
1982 |
|
|
S virtual string_type do_transform
|
1983 |
|
|
(const charT* low, const charT* high) const;
|
1984 |
|
|
S virtual long do_hash (const charT* low, const charT* high) const;
|
1985 |
|
|
};
|
1986 |
|
|
|
1987 |
|
|
|
1988 |
|
|
22.2.5.1 Template class time_get [lib.locale.time.get]
|
1989 |
|
|
|
1990 |
|
|
T class time_base {
|
1991 |
|
|
public:
|
1992 |
|
|
T enum dateorder { no_order, dmy, mdy, ymd, ydm };
|
1993 |
|
|
};
|
1994 |
|
|
|
1995 |
|
|
[Note: semantics of time_get members are implementation-defined.
|
1996 |
|
|
To complete implementation requires documenting behavior.]
|
1997 |
|
|
|
1998 |
|
|
X template >
|
1999 |
|
|
class time_get : public locale::facet, public time_base {
|
2000 |
|
|
public:
|
2001 |
|
|
T typedef charT char_type;
|
2002 |
|
|
T typedef InputIterator iter_type;
|
2003 |
|
|
T explicit time_get(size_t refs = 0);
|
2004 |
|
|
|
2005 |
|
|
T dateorder date_order() const { return do_date_order(); }
|
2006 |
|
|
T iter_type get_time(iter_type s, iter_type end, ios_base& f,
|
2007 |
|
|
ios_base::iostate& err, tm* t) const;
|
2008 |
|
|
T iter_type get_date(iter_type s, iter_type end, ios_base& f,
|
2009 |
|
|
ios_base::iostate& err, tm* t) const;
|
2010 |
|
|
T iter_type get_weekday(iter_type s, iter_type end, ios_base& f,
|
2011 |
|
|
ios_base::iostate& err, tm* t) const;
|
2012 |
|
|
T iter_type get_monthname(iter_type s, iter_type end, ios_base& f,
|
2013 |
|
|
ios_base::iostate& err, tm* t) const;
|
2014 |
|
|
T iter_type get_year(iter_type s, iter_type end, ios_base& f,
|
2015 |
|
|
ios_base::iostate& err, tm* t) const;
|
2016 |
|
|
T static locale::id id;
|
2017 |
|
|
protected:
|
2018 |
|
|
~time_get(); // virtual
|
2019 |
|
|
X virtual dateorder do_date_order() const;
|
2020 |
|
|
S virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&,
|
2021 |
|
|
ios_base::iostate& err, tm* t) const;
|
2022 |
|
|
S virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&,
|
2023 |
|
|
ios_base::iostate& err, tm* t) const;
|
2024 |
|
|
S virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&,
|
2025 |
|
|
ios_base::iostate& err, tm* t) const;
|
2026 |
|
|
S virtual iter_type do_get_monthname(iter_type s, ios_base&,
|
2027 |
|
|
ios_base::iostate& err, tm* t) const;
|
2028 |
|
|
S virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&,
|
2029 |
|
|
ios_base::iostate& err, tm* t) const;
|
2030 |
|
|
};
|
2031 |
|
|
|
2032 |
|
|
|
2033 |
|
|
|
2034 |
|
|
22.2.5.2 Template class [lib.locale.time.get.byname]
|
2035 |
|
|
time_get_byname
|
2036 |
|
|
|
2037 |
|
|
X template >
|
2038 |
|
|
class time_get_byname : public time_get {
|
2039 |
|
|
public:
|
2040 |
|
|
T typedef time_base::dateorder dateorder;
|
2041 |
|
|
T typedef InputIterator iter_type
|
2042 |
|
|
|
2043 |
|
|
S explicit time_get_byname(const char*, size_t refs = 0);
|
2044 |
|
|
protected:
|
2045 |
|
|
S ~time_get_byname(); // virtual
|
2046 |
|
|
S virtual dateorder do_date_order() const;
|
2047 |
|
|
S virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&,
|
2048 |
|
|
ios_base::iostate& err, tm* t) const;
|
2049 |
|
|
S virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&,
|
2050 |
|
|
ios_base::iostate& err, tm* t) const;
|
2051 |
|
|
T virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&,
|
2052 |
|
|
ios_base::iostate& err, tm* t) const;
|
2053 |
|
|
T virtual iter_type do_get_monthname(iter_type s, iter_type end, ios_base&,
|
2054 |
|
|
ios_base::iostate& err, tm* t) const;
|
2055 |
|
|
S virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&,
|
2056 |
|
|
ios_base::iostate& err, tm* t) const;
|
2057 |
|
|
};
|
2058 |
|
|
}
|
2059 |
|
|
|
2060 |
|
|
22.2.5.3 Template class time_put [lib.locale.time.put]
|
2061 |
|
|
|
2062 |
|
|
X template >
|
2063 |
|
|
class time_put : public locale::facet {
|
2064 |
|
|
public:
|
2065 |
|
|
T typedef charT char_type;
|
2066 |
|
|
T typedef OutputIterator iter_type;
|
2067 |
|
|
T explicit time_put(size_t refs = 0);
|
2068 |
|
|
// the following is implemented in terms of other member functions.
|
2069 |
|
|
S iter_type put(iter_type s, ios_base& f, char_type fill, const tm* tmb,
|
2070 |
|
|
const charT* pattern, const charT* pat_end) const;
|
2071 |
|
|
T iter_type put(iter_type s, ios_base& f, char_type fill,
|
2072 |
|
|
const tm* tmb, char format, char modifier = 0) const;
|
2073 |
|
|
T static locale::id id;
|
2074 |
|
|
protected:
|
2075 |
|
|
T ~time_put(); // virtual
|
2076 |
|
|
S virtual iter_type do_put(iter_type s, ios_base&, char_type, const tm* t,
|
2077 |
|
|
char format, char modifier) const;
|
2078 |
|
|
};
|
2079 |
|
|
|
2080 |
|
|
|
2081 |
|
|
|
2082 |
|
|
22.2.5.4 Template class [lib.locale.time.put.byname]
|
2083 |
|
|
time_put_byname
|
2084 |
|
|
|
2085 |
|
|
T template >
|
2086 |
|
|
class time_put_byname : public time_put
|
2087 |
|
|
{
|
2088 |
|
|
public:
|
2089 |
|
|
T typedef charT char_type;
|
2090 |
|
|
T typedef OutputIterator iter_type;
|
2091 |
|
|
|
2092 |
|
|
T explicit time_put_byname(const char*, size_t refs = 0);
|
2093 |
|
|
protected:
|
2094 |
|
|
T ~time_put_byname(); // virtual
|
2095 |
|
|
S virtual iter_type do_put(iter_type s, ios_base&, char_type, const tm* t,
|
2096 |
|
|
char format, char modifier) const;
|
2097 |
|
|
};
|
2098 |
|
|
|
2099 |
|
|
|
2100 |
|
|
22.2.6.1 Template class money_get [lib.locale.money.get]
|
2101 |
|
|
|
2102 |
|
|
X template
|
2103 |
|
|
class InputIterator = istreambuf_iterator >
|
2104 |
|
|
class money_get : public locale::facet {
|
2105 |
|
|
public:
|
2106 |
|
|
T typedef charT char_type;
|
2107 |
|
|
T typedef InputIterator iter_type;
|
2108 |
|
|
T typedef basic_string string_type;
|
2109 |
|
|
T explicit money_get(size_t refs = 0);
|
2110 |
|
|
T iter_type get(iter_type s, iter_type end, bool intl,
|
2111 |
|
|
ios_base& f, ios_base::iostate& err,
|
2112 |
|
|
long double& units) const;
|
2113 |
|
|
T iter_type get(iter_type s, iter_type end, bool intl,
|
2114 |
|
|
ios_base& f, ios_base::iostate& err,
|
2115 |
|
|
string_type& digits) const;
|
2116 |
|
|
T static locale::id id;
|
2117 |
|
|
protected:
|
2118 |
|
|
T ~money_get(); // virtual
|
2119 |
|
|
S virtual iter_type do_get(iter_type, iter_type, bool, ios_base&,
|
2120 |
|
|
ios_base::iostate& err, long double& units) const;
|
2121 |
|
|
S virtual iter_type do_get(iter_type, iter_type, bool, ios_base&,
|
2122 |
|
|
ios_base::iostate& err, string_type& digits) const;
|
2123 |
|
|
};
|
2124 |
|
|
|
2125 |
|
|
22.2.6.2 Template class money_put [lib.locale.money.put]
|
2126 |
|
|
|
2127 |
|
|
X template
|
2128 |
|
|
class OutputIterator = ostreambuf_iterator >
|
2129 |
|
|
class money_put : public locale::facet {
|
2130 |
|
|
public:
|
2131 |
|
|
T typedef charT char_type;
|
2132 |
|
|
T typedef OutputIterator iter_type;
|
2133 |
|
|
T typedef basic_string string_type;
|
2134 |
|
|
T explicit money_put(size_t refs = 0);
|
2135 |
|
|
T iter_type put(iter_type s, bool intl, ios_base& f,
|
2136 |
|
|
char_type fill, long double units) const;
|
2137 |
|
|
T iter_type put(iter_type s, bool intl, ios_base& f,
|
2138 |
|
|
char_type fill, const string_type& digits) const;
|
2139 |
|
|
T static locale::id id;
|
2140 |
|
|
|
2141 |
|
|
protected:
|
2142 |
|
|
T ~money_put(); // virtual
|
2143 |
|
|
S virtual iter_type
|
2144 |
|
|
do_put(iter_type, bool, ios_base&, char_type fill,
|
2145 |
|
|
long double units) const;
|
2146 |
|
|
S virtual iter_type
|
2147 |
|
|
do_put(iter_type, bool, ios_base&, char_type fill,
|
2148 |
|
|
const string_type& digits) const;
|
2149 |
|
|
};
|
2150 |
|
|
|
2151 |
|
|
|
2152 |
|
|
22.2.6.3 Template class moneypunct [lib.locale.moneypunct]
|
2153 |
|
|
|
2154 |
|
|
T class money_base {
|
2155 |
|
|
public:
|
2156 |
|
|
T enum part { none, space, symbol, sign, value };
|
2157 |
|
|
T struct pattern { char field[4]; };
|
2158 |
|
|
};
|
2159 |
|
|
|
2160 |
|
|
X template
|
2161 |
|
|
class moneypunct : public locale::facet, public money_base {
|
2162 |
|
|
public:
|
2163 |
|
|
T typedef charT char_type;
|
2164 |
|
|
T typedef basic_string string_type;
|
2165 |
|
|
T explicit moneypunct(size_t refs = 0);
|
2166 |
|
|
T charT decimal_point() const;
|
2167 |
|
|
T charT thousands_sep() const;
|
2168 |
|
|
T string grouping() const;
|
2169 |
|
|
T string_type curr_symbol() const;
|
2170 |
|
|
T string_type positive_sign() const;
|
2171 |
|
|
T string_type negative_sign() const;
|
2172 |
|
|
T int frac_digits() const;
|
2173 |
|
|
T pattern pos_format() const;
|
2174 |
|
|
T pattern neg_format() const;
|
2175 |
|
|
T static locale::id id;
|
2176 |
|
|
T static const bool intl = International;
|
2177 |
|
|
protected:
|
2178 |
|
|
T ~moneypunct(); // virtual
|
2179 |
|
|
S virtual charT do_decimal_point() const;
|
2180 |
|
|
S virtual charT do_thousands_sep() const;
|
2181 |
|
|
S virtual string do_grouping() const;
|
2182 |
|
|
S virtual string_type do_curr_symbol() const;
|
2183 |
|
|
S virtual string_type do_positive_sign() const;
|
2184 |
|
|
S virtual string_type do_negative_sign() const;
|
2185 |
|
|
S virtual int do_frac_digits() const;
|
2186 |
|
|
T virtual pattern do_pos_format() const;
|
2187 |
|
|
T virtual pattern do_neg_format() const;
|
2188 |
|
|
};
|
2189 |
|
|
}
|
2190 |
|
|
|
2191 |
|
|
22.2.6.4 Template class [lib.locale.moneypunct.byname]
|
2192 |
|
|
moneypunct_byname
|
2193 |
|
|
|
2194 |
|
|
X template
|
2195 |
|
|
class moneypunct_byname : public moneypunct {
|
2196 |
|
|
public:
|
2197 |
|
|
T typedef money_base::pattern pattern;
|
2198 |
|
|
T typedef basic_string string_type;
|
2199 |
|
|
|
2200 |
|
|
T explicit moneypunct_byname(const char*, size_t refs = 0);
|
2201 |
|
|
protected:
|
2202 |
|
|
T ~moneypunct_byname(); // virtual
|
2203 |
|
|
S virtual charT do_decimal_point() const;
|
2204 |
|
|
S virtual charT do_thousands_sep() const;
|
2205 |
|
|
S virtual string do_grouping() const;
|
2206 |
|
|
S virtual string_type do_curr_symbol() const;
|
2207 |
|
|
S virtual string_type do_positive_sign() const;
|
2208 |
|
|
S virtual string_type do_negative_sign() const;
|
2209 |
|
|
S virtual int do_frac_digits() const;
|
2210 |
|
|
S virtual pattern do_pos_format() const;
|
2211 |
|
|
S virtual pattern do_neg_format() const;
|
2212 |
|
|
};
|
2213 |
|
|
|
2214 |
|
|
22.2.7.1 Template class messages [lib.locale.messages]
|
2215 |
|
|
|
2216 |
|
|
T class messages_base {
|
2217 |
|
|
public:
|
2218 |
|
|
T typedef int catalog;
|
2219 |
|
|
};
|
2220 |
|
|
|
2221 |
|
|
X template
|
2222 |
|
|
class messages : public locale::facet, public messages_base {
|
2223 |
|
|
public:
|
2224 |
|
|
T typedef charT char_type;
|
2225 |
|
|
T typedef basic_string string_type;
|
2226 |
|
|
T explicit messages(size_t refs = 0);
|
2227 |
|
|
T catalog open(const basic_string& fn, const locale&) const;
|
2228 |
|
|
T string_type get(catalog c, int set, int msgid,
|
2229 |
|
|
const string_type& dfault) const;
|
2230 |
|
|
T void close(catalog c) const;
|
2231 |
|
|
T static locale::id id;
|
2232 |
|
|
protected:
|
2233 |
|
|
T ~messages(); // virtual
|
2234 |
|
|
S virtual catalog do_open(const basic_string&, const locale&) const;
|
2235 |
|
|
S virtual string_type do_get(catalog, int set, int msgid,
|
2236 |
|
|
const string_type& dfault) const;
|
2237 |
|
|
S virtual void do_close(catalog) const;
|
2238 |
|
|
};
|
2239 |
|
|
|
2240 |
|
|
22.2.7.2 Template class [lib.locale.messages.byname]
|
2241 |
|
|
messages_byname
|
2242 |
|
|
|
2243 |
|
|
|
2244 |
|
|
X template
|
2245 |
|
|
class messages_byname : public messages {
|
2246 |
|
|
public:
|
2247 |
|
|
T typedef messages_base::catalog catalog;
|
2248 |
|
|
T typedef basic_string string_type;
|
2249 |
|
|
|
2250 |
|
|
T explicit messages_byname(const char*, size_t refs = 0);
|
2251 |
|
|
protected:
|
2252 |
|
|
T ~messages_byname(); // virtual
|
2253 |
|
|
S virtual catalog do_open(const basic_string&, const locale&) const;
|
2254 |
|
|
S virtual string_type do_get(catalog, int set, int msgid,
|
2255 |
|
|
const string_type& dfault) const;
|
2256 |
|
|
S virtual void do_close(catalog) const;
|
2257 |
|
|
};
|
2258 |
|
|
|
2259 |
|
|
|
2260 |
|
|
22.3 C Library Locales [lib.c.locales]
|
2261 |
|
|
|
2262 |
|
|
|
2263 |
|
|
Table 13--Header synopsis
|
2264 |
|
|
Macros:
|
2265 |
|
|
X LC_ALL LC_COLLATE LC_CTYPE
|
2266 |
|
|
X LC_MONETARY LC_NUMERIC LC_TIME
|
2267 |
|
|
X NULL
|
2268 |
|
|
X Struct: lconv
|
2269 |
|
|
X Functions: localeconv setlocale
|
2270 |
|
|
|
2271 |
|
|
|
2272 |
|
|
23.2 Sequences [lib.sequences]
|
2273 |
|
|
|
2274 |
|
|
, , , , and .
|
2275 |
|
|
|
2276 |
|
|
Header synopsis
|
2277 |
|
|
|
2278 |
|
|
T template > class deque;
|
2279 |
|
|
T template
|
2280 |
|
|
bool operator==(const deque& x, const deque& y);
|
2281 |
|
|
T template
|
2282 |
|
|
bool operator< (const deque& x, const deque& y);
|
2283 |
|
|
T template
|
2284 |
|
|
bool operator!=(const deque& x, const deque& y);
|
2285 |
|
|
T template
|
2286 |
|
|
bool operator> (const deque& x, const deque& y);
|
2287 |
|
|
T template
|
2288 |
|
|
bool operator>=(const deque& x, const deque& y);
|
2289 |
|
|
T template
|
2290 |
|
|
bool operator<=(const deque& x, const deque& y);
|
2291 |
|
|
T template
|
2292 |
|
|
void swap(deque& x, deque& y);
|
2293 |
|
|
}
|
2294 |
|
|
|
2295 |
|
|
Header synopsis
|
2296 |
|
|
|
2297 |
|
|
T template > class list;
|
2298 |
|
|
T template
|
2299 |
|
|
bool operator==(const list& x, const list& y);
|
2300 |
|
|
T template
|
2301 |
|
|
bool operator< (const list& x, const list& y);
|
2302 |
|
|
T template
|
2303 |
|
|
bool operator!=(const list& x, const list& y);
|
2304 |
|
|
T template
|
2305 |
|
|
bool operator> (const list& x, const list& y);
|
2306 |
|
|
T template
|
2307 |
|
|
bool operator>=(const list& x, const list& y);
|
2308 |
|
|
T template
|
2309 |
|
|
bool operator<=(const list& x, const list& y);
|
2310 |
|
|
T template
|
2311 |
|
|
void swap(list& x, list& y);
|
2312 |
|
|
}
|
2313 |
|
|
|
2314 |
|
|
Header synopsis
|
2315 |
|
|
|
2316 |
|
|
namespace std {
|
2317 |
|
|
T template > class queue;
|
2318 |
|
|
T template
|
2319 |
|
|
bool operator==(const queue& x,
|
2320 |
|
|
const queue& y);
|
2321 |
|
|
T template
|
2322 |
|
|
bool operator< (const queue& x,
|
2323 |
|
|
const queue& y);
|
2324 |
|
|
T template
|
2325 |
|
|
bool operator!=(const queue& x,
|
2326 |
|
|
const queue& y);
|
2327 |
|
|
T template
|
2328 |
|
|
bool operator> (const queue& x,
|
2329 |
|
|
const queue& y);
|
2330 |
|
|
T template
|
2331 |
|
|
bool operator>=(const queue& x,
|
2332 |
|
|
const queue& y);
|
2333 |
|
|
T template
|
2334 |
|
|
bool operator<=(const queue& x,
|
2335 |
|
|
const queue& y);
|
2336 |
|
|
T template ,
|
2337 |
|
|
class Compare = less >
|
2338 |
|
|
T class priority_queue;
|
2339 |
|
|
}
|
2340 |
|
|
|
2341 |
|
|
Header synopsis
|
2342 |
|
|
|
2343 |
|
|
namespace std {
|
2344 |
|
|
T template > class stack;
|
2345 |
|
|
T template
|
2346 |
|
|
bool operator==(const stack& x,
|
2347 |
|
|
const stack& y);
|
2348 |
|
|
T template
|
2349 |
|
|
bool operator< (const stack& x,
|
2350 |
|
|
const stack& y);
|
2351 |
|
|
T template
|
2352 |
|
|
bool operator!=(const stack& x,
|
2353 |
|
|
const stack& y);
|
2354 |
|
|
T template
|
2355 |
|
|
bool operator> (const stack& x,
|
2356 |
|
|
const stack& y);
|
2357 |
|
|
T template
|
2358 |
|
|
bool operator>=(const stack& x,
|
2359 |
|
|
const stack& y);
|
2360 |
|
|
T template
|
2361 |
|
|
bool operator<=(const stack& x,
|
2362 |
|
|
const stack& y);
|
2363 |
|
|
}
|
2364 |
|
|
|
2365 |
|
|
Header synopsis
|
2366 |
|
|
|
2367 |
|
|
T template > class vector;
|
2368 |
|
|
|
2369 |
|
|
T template
|
2370 |
|
|
bool operator==(const vector& x,
|
2371 |
|
|
const vector& y);
|
2372 |
|
|
T template
|
2373 |
|
|
bool operator< (const vector& x,
|
2374 |
|
|
const vector& y);
|
2375 |
|
|
T template
|
2376 |
|
|
bool operator!=(const vector& x,
|
2377 |
|
|
const vector& y);
|
2378 |
|
|
T template
|
2379 |
|
|
bool operator> (const vector& x,
|
2380 |
|
|
const vector& y);
|
2381 |
|
|
T template
|
2382 |
|
|
bool operator>=(const vector& x,
|
2383 |
|
|
const vector& y);
|
2384 |
|
|
T template
|
2385 |
|
|
bool operator<=(const vector& x,
|
2386 |
|
|
const vector& y);
|
2387 |
|
|
T template
|
2388 |
|
|
void swap(vector& x, vector& y);
|
2389 |
|
|
|
2390 |
|
|
T template class vector;
|
2391 |
|
|
T template
|
2392 |
|
|
bool operator==(const vector& x,
|
2393 |
|
|
const vector& y);
|
2394 |
|
|
T template
|
2395 |
|
|
bool operator< (const vector& x,
|
2396 |
|
|
const vector& y);
|
2397 |
|
|
T template
|
2398 |
|
|
bool operator!=(const vector& x,
|
2399 |
|
|
const vector& y);
|
2400 |
|
|
T template
|
2401 |
|
|
bool operator> (const vector& x,
|
2402 |
|
|
const vector& y);
|
2403 |
|
|
T template
|
2404 |
|
|
bool operator>=(const vector& x,
|
2405 |
|
|
const vector& y);
|
2406 |
|
|
T template
|
2407 |
|
|
bool operator<=(const vector& x,
|
2408 |
|
|
const vector& y);
|
2409 |
|
|
T template
|
2410 |
|
|
void swap(vector& x, vector& y);
|
2411 |
|
|
}
|
2412 |
|
|
|
2413 |
|
|
23.2.1 Template class deque [lib.deque]
|
2414 |
|
|
|
2415 |
|
|
template >
|
2416 |
|
|
T class deque {
|
2417 |
|
|
public:
|
2418 |
|
|
// types:
|
2419 |
|
|
T typedef typename Allocator::reference reference;
|
2420 |
|
|
T typedef typename Allocator::const_reference const_reference;
|
2421 |
|
|
T typedef implementation defined iterator;
|
2422 |
|
|
T typedef implementation defined const_iterator;
|
2423 |
|
|
T typedef implementation defined size_type;
|
2424 |
|
|
T typedef implementation defined difference_type;
|
2425 |
|
|
T typedef T value_type;
|
2426 |
|
|
T typedef Allocator allocator_type;
|
2427 |
|
|
T typedef typename Allocator::pointer pointer;
|
2428 |
|
|
T typedef typename Allocator::const_pointer const_pointer;
|
2429 |
|
|
T typedef std::reverse_iterator reverse_iterator;
|
2430 |
|
|
T typedef std::reverse_iterator const_reverse_iterator;
|
2431 |
|
|
// _lib.deque.cons_ construct/copy/destroy:
|
2432 |
|
|
T explicit deque(const Allocator& = Allocator());
|
2433 |
|
|
T explicit deque(size_type n, const T& value = T(),
|
2434 |
|
|
const Allocator& = Allocator());
|
2435 |
|
|
T template
|
2436 |
|
|
deque(InputIterator first, InputIterator last,
|
2437 |
|
|
const Allocator& = Allocator());
|
2438 |
|
|
T deque(const deque& x);
|
2439 |
|
|
T ~deque();
|
2440 |
|
|
T deque& operator=(const deque& x);
|
2441 |
|
|
T template
|
2442 |
|
|
void assign(InputIterator first, InputIterator last);
|
2443 |
|
|
T void assign(size_type n, const T& t);
|
2444 |
|
|
T allocator_type get_allocator() const;
|
2445 |
|
|
// iterators:
|
2446 |
|
|
T iterator begin();
|
2447 |
|
|
T const_iterator begin() const;
|
2448 |
|
|
T iterator end();
|
2449 |
|
|
T const_iterator end() const;
|
2450 |
|
|
T reverse_iterator rbegin();
|
2451 |
|
|
T const_reverse_iterator rbegin() const;
|
2452 |
|
|
T reverse_iterator rend();
|
2453 |
|
|
T const_reverse_iterator rend() const;
|
2454 |
|
|
// _lib.deque.capacity_ capacity:
|
2455 |
|
|
T size_type size() const;
|
2456 |
|
|
T size_type max_size() const;
|
2457 |
|
|
T void resize(size_type sz, T c = T());
|
2458 |
|
|
T bool empty() const;
|
2459 |
|
|
|
2460 |
|
|
// element access:
|
2461 |
|
|
T reference operator[](size_type n);
|
2462 |
|
|
T const_reference operator[](size_type n) const;
|
2463 |
|
|
T reference at(size_type n);
|
2464 |
|
|
T const_reference at(size_type n) const;
|
2465 |
|
|
T reference front();
|
2466 |
|
|
T const_reference front() const;
|
2467 |
|
|
T reference back();
|
2468 |
|
|
T const_reference back() const;
|
2469 |
|
|
// _lib.deque.modifiers_ modifiers:
|
2470 |
|
|
T void push_front(const T& x);
|
2471 |
|
|
T void push_back(const T& x);
|
2472 |
|
|
T iterator insert(iterator position, const T& x);
|
2473 |
|
|
T void insert(iterator position, size_type n, const T& x);
|
2474 |
|
|
T template
|
2475 |
|
|
void insert (iterator position,
|
2476 |
|
|
InputIterator first, InputIterator last);
|
2477 |
|
|
T void pop_front();
|
2478 |
|
|
T void pop_back();
|
2479 |
|
|
T iterator erase(iterator position);
|
2480 |
|
|
T iterator erase(iterator first, iterator last);
|
2481 |
|
|
T void swap(deque&);
|
2482 |
|
|
T void clear();
|
2483 |
|
|
};
|
2484 |
|
|
T template
|
2485 |
|
|
bool operator==(const deque& x,
|
2486 |
|
|
const deque& y);
|
2487 |
|
|
T template
|
2488 |
|
|
bool operator< (const deque& x,
|
2489 |
|
|
const deque& y);
|
2490 |
|
|
T template
|
2491 |
|
|
bool operator!=(const deque& x,
|
2492 |
|
|
const deque& y);
|
2493 |
|
|
T template
|
2494 |
|
|
bool operator> (const deque& x,
|
2495 |
|
|
const deque& y);
|
2496 |
|
|
T template
|
2497 |
|
|
bool operator>=(const deque& x,
|
2498 |
|
|
const deque& y);
|
2499 |
|
|
T template
|
2500 |
|
|
bool operator<=(const deque& x,
|
2501 |
|
|
const deque& y);
|
2502 |
|
|
// specialized algorithms:
|
2503 |
|
|
T template
|
2504 |
|
|
void swap(deque& x, deque& y);
|
2505 |
|
|
|
2506 |
|
|
|
2507 |
|
|
23.2.2 Template class list [lib.list]
|
2508 |
|
|
|
2509 |
|
|
T template >
|
2510 |
|
|
class list {
|
2511 |
|
|
public:
|
2512 |
|
|
// types:
|
2513 |
|
|
T typedef typename Allocator::reference reference;
|
2514 |
|
|
T typedef typename Allocator::const_reference const_reference;
|
2515 |
|
|
T typedef implementation defined iterator;
|
2516 |
|
|
T typedef implementation defined const_iterator;
|
2517 |
|
|
T typedef implementation defined size_type;
|
2518 |
|
|
T typedef implementation defined difference_type;
|
2519 |
|
|
T typedef T value_type;
|
2520 |
|
|
T typedef Allocator allocator_type;
|
2521 |
|
|
T typedef typename Allocator::pointer pointer;
|
2522 |
|
|
T typedef typename Allocator::const_pointer const_pointer;
|
2523 |
|
|
T typedef std::reverse_iterator reverse_iterator;
|
2524 |
|
|
T typedef std::reverse_iterator const_reverse_iterator;
|
2525 |
|
|
|
2526 |
|
|
// _lib.list.cons_ construct/copy/destroy:
|
2527 |
|
|
T explicit list(const Allocator& = Allocator());
|
2528 |
|
|
T explicit list(size_type n, const T& value = T(),
|
2529 |
|
|
const Allocator& = Allocator());
|
2530 |
|
|
T template
|
2531 |
|
|
list(InputIterator first, InputIterator last,
|
2532 |
|
|
const Allocator& = Allocator());
|
2533 |
|
|
T list(const list& x);
|
2534 |
|
|
T ~list();
|
2535 |
|
|
T list& operator=(const list& x);
|
2536 |
|
|
T template
|
2537 |
|
|
void assign(InputIterator first, InputIterator last);
|
2538 |
|
|
T void assign(size_type n, const T& t);
|
2539 |
|
|
T allocator_type get_allocator() const;
|
2540 |
|
|
// iterators:
|
2541 |
|
|
T iterator begin();
|
2542 |
|
|
T const_iterator begin() const;
|
2543 |
|
|
T iterator end();
|
2544 |
|
|
T const_iterator end() const;
|
2545 |
|
|
T reverse_iterator rbegin();
|
2546 |
|
|
T const_reverse_iterator rbegin() const;
|
2547 |
|
|
T reverse_iterator rend();
|
2548 |
|
|
T const_reverse_iterator rend() const;
|
2549 |
|
|
// _lib.list.capacity_ capacity:
|
2550 |
|
|
T bool empty() const;
|
2551 |
|
|
T size_type size() const;
|
2552 |
|
|
T size_type max_size() const;
|
2553 |
|
|
T void resize(size_type sz, T c = T());
|
2554 |
|
|
// element access:
|
2555 |
|
|
T reference front();
|
2556 |
|
|
T const_reference front() const;
|
2557 |
|
|
T reference back();
|
2558 |
|
|
T const_reference back() const;
|
2559 |
|
|
// _lib.list.modifiers_ modifiers:
|
2560 |
|
|
T void push_front(const T& x);
|
2561 |
|
|
T void pop_front();
|
2562 |
|
|
T void push_back(const T& x);
|
2563 |
|
|
T void pop_back();
|
2564 |
|
|
T iterator insert(iterator position, const T& x);
|
2565 |
|
|
T void insert(iterator position, size_type n, const T& x);
|
2566 |
|
|
T template
|
2567 |
|
|
void insert(iterator position, InputIterator first,
|
2568 |
|
|
InputIterator last);
|
2569 |
|
|
T iterator erase(iterator position);
|
2570 |
|
|
T iterator erase(iterator position, iterator last);
|
2571 |
|
|
T void swap(list&);
|
2572 |
|
|
T void clear();
|
2573 |
|
|
// _lib.list.ops_ list operations:
|
2574 |
|
|
T void splice(iterator position, list& x);
|
2575 |
|
|
T void splice(iterator position, list& x, iterator i);
|
2576 |
|
|
T void splice(iterator position, list& x, iterator first,
|
2577 |
|
|
iterator last);
|
2578 |
|
|
T void remove(const T& value);
|
2579 |
|
|
T template void remove_if(Predicate pred);
|
2580 |
|
|
|
2581 |
|
|
T void unique();
|
2582 |
|
|
T template
|
2583 |
|
|
void unique(BinaryPredicate binary_pred);
|
2584 |
|
|
T void merge(list& x);
|
2585 |
|
|
T template void merge(list& x, Compare comp);
|
2586 |
|
|
void sort();
|
2587 |
|
|
T template void sort(Compare comp);
|
2588 |
|
|
void reverse();
|
2589 |
|
|
};
|
2590 |
|
|
T template
|
2591 |
|
|
bool operator==(const list& x, const list& y);
|
2592 |
|
|
T template
|
2593 |
|
|
bool operator< (const list& x, const list& y);
|
2594 |
|
|
T template
|
2595 |
|
|
bool operator!=(const list& x, const list& y);
|
2596 |
|
|
T template
|
2597 |
|
|
bool operator> (const list& x, const list& y);
|
2598 |
|
|
T template
|
2599 |
|
|
bool operator>=(const list& x, const list& y);
|
2600 |
|
|
T template
|
2601 |
|
|
bool operator<=(const list& x, const list& y);
|
2602 |
|
|
// specialized algorithms:
|
2603 |
|
|
T template
|
2604 |
|
|
void swap(list& x, list& y);
|
2605 |
|
|
|
2606 |
|
|
|
2607 |
|
|
23.2.3.1 Template class queue [lib.queue]
|
2608 |
|
|
|
2609 |
|
|
T template >
|
2610 |
|
|
class queue {
|
2611 |
|
|
public:
|
2612 |
|
|
T typedef typename Container::value_type value_type;
|
2613 |
|
|
T typedef typename Container::size_type size_type;
|
2614 |
|
|
T typedef Container container_type;
|
2615 |
|
|
protected:
|
2616 |
|
|
T Container c;
|
2617 |
|
|
public:
|
2618 |
|
|
T explicit queue(const Container& = Container());
|
2619 |
|
|
|
2620 |
|
|
T bool empty() const { return c.empty(); }
|
2621 |
|
|
T size_type size() const { return c.size(); }
|
2622 |
|
|
T value_type& front() { return c.front(); }
|
2623 |
|
|
T const value_type& front() const { return c.front(); }
|
2624 |
|
|
T value_type& back() { return c.back(); }
|
2625 |
|
|
T const value_type& back() const { return c.back(); }
|
2626 |
|
|
T void push(const value_type& x) { c.push_back(x); }
|
2627 |
|
|
T void pop() { c.pop_front(); }
|
2628 |
|
|
};
|
2629 |
|
|
|
2630 |
|
|
T template
|
2631 |
|
|
bool operator==(const queue& x,
|
2632 |
|
|
const queue& y);
|
2633 |
|
|
T template
|
2634 |
|
|
bool operator< (const queue& x,
|
2635 |
|
|
const queue& y);
|
2636 |
|
|
T template
|
2637 |
|
|
bool operator!=(const queue& x,
|
2638 |
|
|
const queue& y);
|
2639 |
|
|
T template
|
2640 |
|
|
bool operator> (const queue& x,
|
2641 |
|
|
const queue& y);
|
2642 |
|
|
T template
|
2643 |
|
|
bool operator>=(const queue& x,
|
2644 |
|
|
const queue& y);
|
2645 |
|
|
T template
|
2646 |
|
|
bool operator<=(const queue& x,
|
2647 |
|
|
const queue& y);
|
2648 |
|
|
|
2649 |
|
|
23.2.3.2 Template class priority_queue [lib.priority.queue]
|
2650 |
|
|
|
2651 |
|
|
T template ,
|
2652 |
|
|
class Compare = less >
|
2653 |
|
|
class priority_queue {
|
2654 |
|
|
public:
|
2655 |
|
|
T typedef typename Container::value_type value_type;
|
2656 |
|
|
T typedef typename Container::size_type size_type;
|
2657 |
|
|
T typedef Container container_type;
|
2658 |
|
|
protected:
|
2659 |
|
|
T Container c;
|
2660 |
|
|
T Compare comp;
|
2661 |
|
|
public:
|
2662 |
|
|
T explicit priority_queue(const Compare& x = Compare(),
|
2663 |
|
|
const Container& = Container());
|
2664 |
|
|
T template
|
2665 |
|
|
priority_queue(InputIterator first, InputIterator last,
|
2666 |
|
|
const Compare& x = Compare(),
|
2667 |
|
|
const Container& = Container());
|
2668 |
|
|
|
2669 |
|
|
T bool empty() const { return c.empty(); }
|
2670 |
|
|
T size_type size() const { return c.size(); }
|
2671 |
|
|
T const value_type& top() const { return c.front(); }
|
2672 |
|
|
T void push(const value_type& x);
|
2673 |
|
|
T void pop();
|
2674 |
|
|
};
|
2675 |
|
|
|
2676 |
|
|
23.2.3.3 Template class stack [lib.stack]
|
2677 |
|
|
|
2678 |
|
|
T template >
|
2679 |
|
|
class stack {
|
2680 |
|
|
public:
|
2681 |
|
|
T typedef typename Container::value_type value_type;
|
2682 |
|
|
T typedef typename Container::size_type size_type;
|
2683 |
|
|
T typedef Container container_type;
|
2684 |
|
|
protected:
|
2685 |
|
|
T Container c;
|
2686 |
|
|
public:
|
2687 |
|
|
T explicit stack(const Container& = Container());
|
2688 |
|
|
|
2689 |
|
|
T bool empty() const { return c.empty(); }
|
2690 |
|
|
T size_type size() const { return c.size(); }
|
2691 |
|
|
T value_type& top() { return c.back(); }
|
2692 |
|
|
T const value_type& top() const { return c.back(); }
|
2693 |
|
|
T void push(const value_type& x) { c.push_back(x); }
|
2694 |
|
|
T void pop() { c.pop_back(); }
|
2695 |
|
|
};
|
2696 |
|
|
T template
|
2697 |
|
|
bool operator==(const stack& x,
|
2698 |
|
|
const stack& y);
|
2699 |
|
|
T template
|
2700 |
|
|
bool operator< (const stack& x,
|
2701 |
|
|
const stack& y);
|
2702 |
|
|
T template
|
2703 |
|
|
bool operator!=(const stack& x,
|
2704 |
|
|
const stack& y);
|
2705 |
|
|
T template
|
2706 |
|
|
bool operator> (const stack& x,
|
2707 |
|
|
const stack& y);
|
2708 |
|
|
T template
|
2709 |
|
|
bool operator>=(const stack& x,
|
2710 |
|
|
const stack& y);
|
2711 |
|
|
T template
|
2712 |
|
|
bool operator<=(const stack& x,
|
2713 |
|
|
const stack& y);
|
2714 |
|
|
|
2715 |
|
|
23.2.4 Template class vector [lib.vector]
|
2716 |
|
|
|
2717 |
|
|
template >
|
2718 |
|
|
T class vector {
|
2719 |
|
|
public:
|
2720 |
|
|
// types:
|
2721 |
|
|
T typedef typename Allocator::reference reference;
|
2722 |
|
|
T typedef typename Allocator::const_reference const_reference;
|
2723 |
|
|
T typedef implementation defined iterator;
|
2724 |
|
|
T typedef implementation defined const_iterator;
|
2725 |
|
|
T typedef implementation defined size_type;
|
2726 |
|
|
T typedef implementation defined difference_type;
|
2727 |
|
|
T typedef T value_type;
|
2728 |
|
|
T typedef Allocator allocator_type;
|
2729 |
|
|
T typedef typename Allocator::pointer pointer;
|
2730 |
|
|
T typedef typename Allocator::const_pointer const_pointer
|
2731 |
|
|
T typedef std::reverse_iterator reverse_iterator;
|
2732 |
|
|
T typedef std::reverse_iterator const_reverse_iterator;
|
2733 |
|
|
// _lib.vector.cons_ construct/copy/destroy:
|
2734 |
|
|
T explicit vector(const Allocator& = Allocator());
|
2735 |
|
|
T explicit vector(size_type n, const T& value = T(),
|
2736 |
|
|
const Allocator& = Allocator());
|
2737 |
|
|
T template
|
2738 |
|
|
vector(InputIterator first, InputIterator last,
|
2739 |
|
|
const Allocator& = Allocator());
|
2740 |
|
|
T vector(const vector& x);
|
2741 |
|
|
T ~vector();
|
2742 |
|
|
T vector& operator=(const vector& x);
|
2743 |
|
|
T template
|
2744 |
|
|
void assign(InputIterator first, InputIterator last);
|
2745 |
|
|
T void assign(size_type n, const T& u);
|
2746 |
|
|
T allocator_type get_allocator() const;
|
2747 |
|
|
// iterators:
|
2748 |
|
|
T iterator begin();
|
2749 |
|
|
T const_iterator begin() const;
|
2750 |
|
|
T iterator end();
|
2751 |
|
|
T const_iterator end() const;
|
2752 |
|
|
T reverse_iterator rbegin();
|
2753 |
|
|
T const_reverse_iterator rbegin() const;
|
2754 |
|
|
T reverse_iterator rend();
|
2755 |
|
|
T const_reverse_iterator rend() const;
|
2756 |
|
|
// _lib.vector.capacity_ capacity:
|
2757 |
|
|
T size_type size() const;
|
2758 |
|
|
T size_type max_size() const;
|
2759 |
|
|
T void resize(size_type sz, T c = T());
|
2760 |
|
|
T size_type capacity() const;
|
2761 |
|
|
T bool empty() const;
|
2762 |
|
|
T void reserve(size_type n);
|
2763 |
|
|
|
2764 |
|
|
// element access:
|
2765 |
|
|
T reference operator[](size_type n);
|
2766 |
|
|
T const_reference operator[](size_type n) const;
|
2767 |
|
|
T const_reference at(size_type n) const;
|
2768 |
|
|
T reference at(size_type n);
|
2769 |
|
|
T reference front();
|
2770 |
|
|
T const_reference front() const;
|
2771 |
|
|
T reference back();
|
2772 |
|
|
T const_reference back() const;
|
2773 |
|
|
// _lib.vector.modifiers_ modifiers:
|
2774 |
|
|
T void push_back(const T& x);
|
2775 |
|
|
T void pop_back();
|
2776 |
|
|
T iterator insert(iterator position, const T& x);
|
2777 |
|
|
T void insert(iterator position, size_type n, const T& x);
|
2778 |
|
|
T template
|
2779 |
|
|
void insert(iterator position,
|
2780 |
|
|
InputIterator first, InputIterator last);
|
2781 |
|
|
T iterator erase(iterator position);
|
2782 |
|
|
T iterator erase(iterator first, iterator last);
|
2783 |
|
|
T void swap(vector&);
|
2784 |
|
|
T void clear();
|
2785 |
|
|
};
|
2786 |
|
|
|
2787 |
|
|
T template
|
2788 |
|
|
bool operator==(const vector& x,
|
2789 |
|
|
const vector& y);
|
2790 |
|
|
T template
|
2791 |
|
|
bool operator< (const vector& x,
|
2792 |
|
|
const vector& y);
|
2793 |
|
|
T template
|
2794 |
|
|
bool operator!=(const vector& x,
|
2795 |
|
|
const vector& y);
|
2796 |
|
|
T template
|
2797 |
|
|
bool operator> (const vector& x,
|
2798 |
|
|
const vector& y);
|
2799 |
|
|
T template
|
2800 |
|
|
bool operator>=(const vector& x,
|
2801 |
|
|
const vector& y);
|
2802 |
|
|
T template
|
2803 |
|
|
bool operator<=(const vector& x,
|
2804 |
|
|
const vector& y);
|
2805 |
|
|
// specialized algorithms:
|
2806 |
|
|
T template
|
2807 |
|
|
void swap(vector& x, vector& y);
|
2808 |
|
|
|
2809 |
|
|
|
2810 |
|
|
23.2.5 Class vector [lib.vector.bool]
|
2811 |
|
|
|
2812 |
|
|
T template class vector {
|
2813 |
|
|
public:
|
2814 |
|
|
// types:
|
2815 |
|
|
T typedef bool const_reference;
|
2816 |
|
|
T typedef implementation defined iterator;
|
2817 |
|
|
T typedef implementation defined const_iterator;
|
2818 |
|
|
T typedef implementation defined size_type;
|
2819 |
|
|
T typedef implementation defined difference_type;
|
2820 |
|
|
T typedef bool value_type;
|
2821 |
|
|
T typedef Allocator allocator_type;
|
2822 |
|
|
T typedef implementation defined pointer;
|
2823 |
|
|
T typedef implementation defined const_pointer
|
2824 |
|
|
T typedef std::reverse_iterator reverse_iterator;
|
2825 |
|
|
T typedef std::reverse_iterator const_reverse_iterator;
|
2826 |
|
|
// bit reference:
|
2827 |
|
|
T class reference {
|
2828 |
|
|
friend class vector;
|
2829 |
|
|
T reference();
|
2830 |
|
|
public:
|
2831 |
|
|
T ~reference();
|
2832 |
|
|
T operator bool() const;
|
2833 |
|
|
T reference& operator=(const bool x);
|
2834 |
|
|
T reference& operator=(const reference& x);
|
2835 |
|
|
T void flip(); // flips the bit
|
2836 |
|
|
};
|
2837 |
|
|
|
2838 |
|
|
// construct/copy/destroy:
|
2839 |
|
|
T explicit vector(const Allocator& = Allocator());
|
2840 |
|
|
T explicit vector(size_type n, const bool& value = bool(),
|
2841 |
|
|
const Allocator& = Allocator());
|
2842 |
|
|
T template
|
2843 |
|
|
vector(InputIterator first, InputIterator last,
|
2844 |
|
|
const Allocator& = Allocator());
|
2845 |
|
|
T vector(const vector& x);
|
2846 |
|
|
T ~vector();
|
2847 |
|
|
T vector& operator=(const vector& x);
|
2848 |
|
|
T template
|
2849 |
|
|
void assign(InputIterator first, InputIterator last);
|
2850 |
|
|
T void assign(size_type n, const T& t);
|
2851 |
|
|
T allocator_type get_allocator() const;
|
2852 |
|
|
// iterators:
|
2853 |
|
|
T iterator begin();
|
2854 |
|
|
T const_iterator begin() const;
|
2855 |
|
|
T iterator end();
|
2856 |
|
|
T const_iterator end() const;
|
2857 |
|
|
T reverse_iterator rbegin();
|
2858 |
|
|
T const_reverse_iterator rbegin() const;
|
2859 |
|
|
T reverse_iterator rend();
|
2860 |
|
|
T const_reverse_iterator rend() const;
|
2861 |
|
|
// capacity:
|
2862 |
|
|
T size_type size() const;
|
2863 |
|
|
T size_type max_size() const;
|
2864 |
|
|
T void resize(size_type sz, bool c = false);
|
2865 |
|
|
T size_type capacity() const;
|
2866 |
|
|
T bool empty() const;
|
2867 |
|
|
T void reserve(size_type n);
|
2868 |
|
|
// element access:
|
2869 |
|
|
T reference operator[](size_type n);
|
2870 |
|
|
T const_reference operator[](size_type n) const;
|
2871 |
|
|
T const_reference at(size_type n) const;
|
2872 |
|
|
T reference at(size_type n);
|
2873 |
|
|
T reference front();
|
2874 |
|
|
T const_reference front() const;
|
2875 |
|
|
T reference back();
|
2876 |
|
|
T const_reference back() const;
|
2877 |
|
|
// modifiers:
|
2878 |
|
|
T void push_back(const bool& x);
|
2879 |
|
|
T void pop_back();
|
2880 |
|
|
T iterator insert(iterator position, const bool& x);
|
2881 |
|
|
T void insert (iterator position, size_type n, const bool& x);
|
2882 |
|
|
T template
|
2883 |
|
|
void insert(iterator position,
|
2884 |
|
|
InputIterator first, InputIterator last);
|
2885 |
|
|
T iterator erase(iterator position);
|
2886 |
|
|
T iterator erase(iterator first, iterator last);
|
2887 |
|
|
T void swap(vector&);
|
2888 |
|
|
T static void swap(reference x, reference y);
|
2889 |
|
|
T void flip(); // flips all bits
|
2890 |
|
|
T void clear();
|
2891 |
|
|
};
|
2892 |
|
|
|
2893 |
|
|
T template
|
2894 |
|
|
bool operator==(const vector& x,
|
2895 |
|
|
const vector& y);
|
2896 |
|
|
T template
|
2897 |
|
|
bool operator< (const vector& x,
|
2898 |
|
|
const vector& y);
|
2899 |
|
|
T template
|
2900 |
|
|
bool operator!=(const vector& x,
|
2901 |
|
|
const vector& y);
|
2902 |
|
|
T template
|
2903 |
|
|
bool operator> (const vector& x,
|
2904 |
|
|
const vector& y);
|
2905 |
|
|
T template
|
2906 |
|
|
bool operator>=(const vector& x,
|
2907 |
|
|
const vector& y);
|
2908 |
|
|
T template
|
2909 |
|
|
bool operator<=(const vector& x,
|
2910 |
|
|
const vector& y);
|
2911 |
|
|
// specialized algorithms:
|
2912 |
|
|
T template
|
2913 |
|
|
void swap(vector& x, vector& y);
|
2914 |
|
|
|
2915 |
|
|
23.3 Associative containers [lib.associative]
|
2916 |
|
|
|
2917 |
|
|
|
2918 |
|
|
|
2919 |
|
|
Header
|
2920 |
|
|
|
2921 |
|
|
template ,
|
2922 |
|
|
class Allocator = allocator > >
|
2923 |
|
|
T class map;
|
2924 |
|
|
|
2925 |
|
|
T template
|
2926 |
|
|
bool operator==(const map& x,
|
2927 |
|
|
const map& y);
|
2928 |
|
|
T template
|
2929 |
|
|
bool operator< (const map& x,
|
2930 |
|
|
const map& y);
|
2931 |
|
|
T template
|
2932 |
|
|
bool operator!=(const map& x,
|
2933 |
|
|
const map& y);
|
2934 |
|
|
T template
|
2935 |
|
|
bool operator> (const map& x,
|
2936 |
|
|
const map& y);
|
2937 |
|
|
T template
|
2938 |
|
|
bool operator>=(const map& x,
|
2939 |
|
|
const map& y);
|
2940 |
|
|
T template
|
2941 |
|
|
bool operator<=(const map& x,
|
2942 |
|
|
const map& y);
|
2943 |
|
|
T template
|
2944 |
|
|
void swap(map& x,
|
2945 |
|
|
map& y);
|
2946 |
|
|
T template ,
|
2947 |
|
|
class Allocator = allocator > >
|
2948 |
|
|
class multimap;
|
2949 |
|
|
T template
|
2950 |
|
|
bool operator==(const multimap& x,
|
2951 |
|
|
const multimap& y);
|
2952 |
|
|
T template
|
2953 |
|
|
bool operator< (const multimap& x,
|
2954 |
|
|
const multimap& y);
|
2955 |
|
|
T template
|
2956 |
|
|
bool operator!=(const multimap& x,
|
2957 |
|
|
const multimap& y);
|
2958 |
|
|
T template
|
2959 |
|
|
bool operator> (const multimap& x,
|
2960 |
|
|
const multimap& y);
|
2961 |
|
|
T template
|
2962 |
|
|
bool operator>=(const multimap& x,
|
2963 |
|
|
const multimap& y);
|
2964 |
|
|
T template
|
2965 |
|
|
bool operator<=(const multimap& x,
|
2966 |
|
|
const multimap& y);
|
2967 |
|
|
T template
|
2968 |
|
|
void swap(multimap& x,
|
2969 |
|
|
multimap& y);
|
2970 |
|
|
}
|
2971 |
|
|
|
2972 |
|
|
Header synopsis
|
2973 |
|
|
|
2974 |
|
|
template ,
|
2975 |
|
|
class Allocator = allocator >
|
2976 |
|
|
T class set;
|
2977 |
|
|
|
2978 |
|
|
T template
|
2979 |
|
|
bool operator==(const set& x,
|
2980 |
|
|
const set& y);
|
2981 |
|
|
T template
|
2982 |
|
|
bool operator< (const set& x,
|
2983 |
|
|
const set& y);
|
2984 |
|
|
T template
|
2985 |
|
|
bool operator!=(const set& x,
|
2986 |
|
|
const set& y);
|
2987 |
|
|
T template
|
2988 |
|
|
bool operator> (const set& x,
|
2989 |
|
|
const set& y);
|
2990 |
|
|
T template
|
2991 |
|
|
bool operator>=(const set& x,
|
2992 |
|
|
const set& y);
|
2993 |
|
|
T template
|
2994 |
|
|
bool operator<=(const set& x,
|
2995 |
|
|
const set& y);
|
2996 |
|
|
T template
|
2997 |
|
|
void swap(set& x,
|
2998 |
|
|
set& y);
|
2999 |
|
|
T template ,
|
3000 |
|
|
class Allocator = allocator >
|
3001 |
|
|
class multiset;
|
3002 |
|
|
T template
|
3003 |
|
|
bool operator==(const multiset& x,
|
3004 |
|
|
const multiset& y);
|
3005 |
|
|
T template
|
3006 |
|
|
bool operator< (const multiset& x,
|
3007 |
|
|
const multiset& y);
|
3008 |
|
|
T template
|
3009 |
|
|
bool operator!=(const multiset& x,
|
3010 |
|
|
const multiset& y);
|
3011 |
|
|
T template
|
3012 |
|
|
bool operator> (const multiset& x,
|
3013 |
|
|
const multiset& y);
|
3014 |
|
|
T template
|
3015 |
|
|
bool operator>=(const multiset& x,
|
3016 |
|
|
const multiset& y);
|
3017 |
|
|
T template
|
3018 |
|
|
bool operator<=(const multiset& x,
|
3019 |
|
|
const multiset& y);
|
3020 |
|
|
T template
|
3021 |
|
|
void swap(multiset& x,
|
3022 |
|
|
multiset& y);
|
3023 |
|
|
}
|
3024 |
|
|
|
3025 |
|
|
23.3.1 Template class map [lib.map]
|
3026 |
|
|
|
3027 |
|
|
template ,
|
3028 |
|
|
class Allocator = allocator > >
|
3029 |
|
|
T class map {
|
3030 |
|
|
public:
|
3031 |
|
|
// types:
|
3032 |
|
|
T typedef Key key_type;
|
3033 |
|
|
T typedef T mapped_type;
|
3034 |
|
|
T typedef pair value_type;
|
3035 |
|
|
T typedef Compare key_compare;
|
3036 |
|
|
T typedef Allocator allocator_type;
|
3037 |
|
|
T typedef typename Allocator::reference reference;
|
3038 |
|
|
T typedef typename Allocator::const_reference const_reference;
|
3039 |
|
|
T typedef implementation defined iterator;
|
3040 |
|
|
T typedef implementation defined const_iterator;
|
3041 |
|
|
T typedef implementation defined size_type;
|
3042 |
|
|
T typedef implementation defined difference_type;
|
3043 |
|
|
T typedef typename Allocator::pointer pointer;
|
3044 |
|
|
T typedef typename Allocator::const_pointer const_pointer;
|
3045 |
|
|
T typedef std::reverse_iterator reverse_iterator;
|
3046 |
|
|
T typedef std::reverse_iterator const_reverse_iterator;
|
3047 |
|
|
T class value_compare
|
3048 |
|
|
: public binary_function {
|
3049 |
|
|
friend class map;
|
3050 |
|
|
protected:
|
3051 |
|
|
T Compare comp;
|
3052 |
|
|
T value_compare(Compare c) : comp(c) {}
|
3053 |
|
|
public:
|
3054 |
|
|
T bool operator()(const value_type& x, const value_type& y) const {
|
3055 |
|
|
return comp(x.first, y.first);
|
3056 |
|
|
}
|
3057 |
|
|
};
|
3058 |
|
|
|
3059 |
|
|
// _lib.map.cons_ construct/copy/destroy:
|
3060 |
|
|
T explicit map(const Compare& comp = Compare(),
|
3061 |
|
|
const Allocator& = Allocator());
|
3062 |
|
|
T template
|
3063 |
|
|
map(InputIterator first, InputIterator last,
|
3064 |
|
|
const Compare& comp = Compare(), const Allocator& = Allocator());
|
3065 |
|
|
T map(const map& x);
|
3066 |
|
|
T ~map();
|
3067 |
|
|
T map&
|
3068 |
|
|
operator=(const map& x);
|
3069 |
|
|
// iterators:
|
3070 |
|
|
T iterator begin();
|
3071 |
|
|
T const_iterator begin() const;
|
3072 |
|
|
T iterator end();
|
3073 |
|
|
T const_iterator end() const;
|
3074 |
|
|
T reverse_iterator rbegin();
|
3075 |
|
|
T const_reverse_iterator rbegin() const;
|
3076 |
|
|
T reverse_iterator rend();
|
3077 |
|
|
T const_reverse_iterator rend() const;
|
3078 |
|
|
// capacity:
|
3079 |
|
|
T bool empty() const;
|
3080 |
|
|
T size_type size() const;
|
3081 |
|
|
T size_type max_size() const;
|
3082 |
|
|
// _lib.map.access_ element access:
|
3083 |
|
|
T T& operator[](const key_type& x);
|
3084 |
|
|
// modifiers:
|
3085 |
|
|
T pair insert(const value_type& x);
|
3086 |
|
|
T iterator insert(iterator position, const value_type& x);
|
3087 |
|
|
T template
|
3088 |
|
|
void insert(InputIterator first, InputIterator last);
|
3089 |
|
|
T void erase(iterator position);
|
3090 |
|
|
T size_type erase(const key_type& x);
|
3091 |
|
|
T void erase(iterator first, iterator last);
|
3092 |
|
|
T void swap(map&);
|
3093 |
|
|
T void clear();
|
3094 |
|
|
// observers:
|
3095 |
|
|
T key_compare key_comp() const;
|
3096 |
|
|
T value_compare value_comp() const;
|
3097 |
|
|
// _lib.map.ops_ map operations:
|
3098 |
|
|
T iterator find(const key_type& x);
|
3099 |
|
|
T const_iterator find(const key_type& x) const;
|
3100 |
|
|
T size_type count(const key_type& x) const;
|
3101 |
|
|
T iterator lower_bound(const key_type& x);
|
3102 |
|
|
T const_iterator lower_bound(const key_type& x) const;
|
3103 |
|
|
T iterator upper_bound(const key_type& x);
|
3104 |
|
|
T const_iterator upper_bound(const key_type& x) const;
|
3105 |
|
|
T pair
|
3106 |
|
|
equal_range(const key_type& x);
|
3107 |
|
|
T pair
|
3108 |
|
|
equal_range(const key_type& x) const;
|
3109 |
|
|
};
|
3110 |
|
|
|
3111 |
|
|
T template
|
3112 |
|
|
bool operator==(const map& x,
|
3113 |
|
|
const map& y);
|
3114 |
|
|
T template
|
3115 |
|
|
bool operator< (const map& x,
|
3116 |
|
|
const map& y);
|
3117 |
|
|
T template
|
3118 |
|
|
bool operator!=(const map& x,
|
3119 |
|
|
const map& y);
|
3120 |
|
|
T template
|
3121 |
|
|
bool operator> (const map& x,
|
3122 |
|
|
const map& y);
|
3123 |
|
|
T template
|
3124 |
|
|
bool operator>=(const map& x,
|
3125 |
|
|
const map& y);
|
3126 |
|
|
T template
|
3127 |
|
|
bool operator<=(const map& x,
|
3128 |
|
|
const map& y);
|
3129 |
|
|
// specialized algorithms:
|
3130 |
|
|
T template
|
3131 |
|
|
void swap(map& x,
|
3132 |
|
|
map& y);
|
3133 |
|
|
|
3134 |
|
|
23.3.2 Template class multimap [lib.multimap]
|
3135 |
|
|
|
3136 |
|
|
template ,
|
3137 |
|
|
class Allocator = allocator > >
|
3138 |
|
|
T class multimap {
|
3139 |
|
|
public:
|
3140 |
|
|
// types:
|
3141 |
|
|
T typedef Key key_type;
|
3142 |
|
|
T typedef T mapped_type;
|
3143 |
|
|
T typedef pair value_type;
|
3144 |
|
|
T typedef Compare key_compare;
|
3145 |
|
|
T typedef Allocator allocator_type;
|
3146 |
|
|
T typedef typename Allocator::reference reference;
|
3147 |
|
|
T typedef typename Allocator::const_reference const_reference;
|
3148 |
|
|
T typedef implementation defined iterator;
|
3149 |
|
|
T typedef implementation defined const_iterator;
|
3150 |
|
|
T typedef implementation defined size_type;
|
3151 |
|
|
T typedef implementation defined difference_type
|
3152 |
|
|
T typedef typename Allocator::pointer pointer;
|
3153 |
|
|
T typedef typename Allocator::const_pointer const_pointer;
|
3154 |
|
|
T typedef std::reverse_iterator reverse_iterator;
|
3155 |
|
|
T typedef std::reverse_iterator const_reverse_iterator;
|
3156 |
|
|
T class value_compare
|
3157 |
|
|
: public binary_function {
|
3158 |
|
|
friend class multimap;
|
3159 |
|
|
protected:
|
3160 |
|
|
T Compare comp;
|
3161 |
|
|
T value_compare(Compare c) : comp(c) {}
|
3162 |
|
|
public:
|
3163 |
|
|
T bool operator()(const value_type& x, const value_type& y) const {
|
3164 |
|
|
return comp(x.first, y.first);
|
3165 |
|
|
}
|
3166 |
|
|
};
|
3167 |
|
|
// construct/copy/destroy:
|
3168 |
|
|
T explicit multimap(const Compare& comp = Compare(),
|
3169 |
|
|
const Allocator& = Allocator());
|
3170 |
|
|
T template
|
3171 |
|
|
multimap(InputIterator first, InputIterator last,
|
3172 |
|
|
const Compare& comp = Compare(),
|
3173 |
|
|
const Allocator& = Allocator());
|
3174 |
|
|
T multimap(const multimap& x);
|
3175 |
|
|
T ~multimap();
|
3176 |
|
|
T multimap&
|
3177 |
|
|
operator=(const multimap& x);
|
3178 |
|
|
T allocator_type get_allocator() const;
|
3179 |
|
|
|
3180 |
|
|
// iterators:
|
3181 |
|
|
T iterator begin();
|
3182 |
|
|
T const_iterator begin() const;
|
3183 |
|
|
T iterator end();
|
3184 |
|
|
T const_iterator end() const;
|
3185 |
|
|
T reverse_iterator rbegin();
|
3186 |
|
|
T const_reverse_iterator rbegin() const;
|
3187 |
|
|
T reverse_iterator rend();
|
3188 |
|
|
T const_reverse_iterator rend() const;
|
3189 |
|
|
// capacity:
|
3190 |
|
|
T bool empty() const;
|
3191 |
|
|
T size_type size() const;
|
3192 |
|
|
T size_type max_size() const;
|
3193 |
|
|
// modifiers:
|
3194 |
|
|
T iterator insert(const value_type& x);
|
3195 |
|
|
T iterator insert(iterator position, const value_type& x);
|
3196 |
|
|
T template
|
3197 |
|
|
void insert(InputIterator first, InputIterator last);
|
3198 |
|
|
T void erase(iterator position);
|
3199 |
|
|
T size_type erase(const key_type& x);
|
3200 |
|
|
T void erase(iterator first, iterator last);
|
3201 |
|
|
T void swap(multimap&);
|
3202 |
|
|
T void clear();
|
3203 |
|
|
// observers:
|
3204 |
|
|
T key_compare key_comp() const;
|
3205 |
|
|
T value_compare value_comp() const;
|
3206 |
|
|
// map operations:
|
3207 |
|
|
T iterator find(const key_type& x);
|
3208 |
|
|
T const_iterator find(const key_type& x) const;
|
3209 |
|
|
T size_type count(const key_type& x) const;
|
3210 |
|
|
T iterator lower_bound(const key_type& x);
|
3211 |
|
|
T const_iterator lower_bound(const key_type& x) const;
|
3212 |
|
|
T iterator upper_bound(const key_type& x);
|
3213 |
|
|
T const_iterator upper_bound(const key_type& x) const;
|
3214 |
|
|
T pair equal_range(const key_type& x);
|
3215 |
|
|
T pair equal_range(const key_type& x) const;
|
3216 |
|
|
};
|
3217 |
|
|
|
3218 |
|
|
T template
|
3219 |
|
|
bool operator==(const multimap& x,
|
3220 |
|
|
const multimap& y);
|
3221 |
|
|
T template
|
3222 |
|
|
bool operator< (const multimap& x,
|
3223 |
|
|
const multimap& y);
|
3224 |
|
|
T template
|
3225 |
|
|
bool operator!=(const multimap& x,
|
3226 |
|
|
const multimap& y);
|
3227 |
|
|
T template
|
3228 |
|
|
bool operator> (const multimap& x,
|
3229 |
|
|
const multimap& y);
|
3230 |
|
|
T template
|
3231 |
|
|
bool operator>=(const multimap& x,
|
3232 |
|
|
const multimap& y);
|
3233 |
|
|
T template
|
3234 |
|
|
bool operator<=(const multimap& x,
|
3235 |
|
|
const multimap& y);
|
3236 |
|
|
// specialized algorithms:
|
3237 |
|
|
T template
|
3238 |
|
|
void swap(multimap& x,
|
3239 |
|
|
multimap& y);
|
3240 |
|
|
|
3241 |
|
|
|
3242 |
|
|
23.3.3 Template class set [lib.set]
|
3243 |
|
|
|
3244 |
|
|
template ,
|
3245 |
|
|
class Allocator = allocator >
|
3246 |
|
|
T class set {
|
3247 |
|
|
public:
|
3248 |
|
|
// types:
|
3249 |
|
|
T typedef Key key_type;
|
3250 |
|
|
T typedef Key value_type;
|
3251 |
|
|
T typedef Compare key_compare;
|
3252 |
|
|
T typedef Compare value_compare;
|
3253 |
|
|
T typedef Allocator allocator_type;
|
3254 |
|
|
T typedef typename Allocator::reference reference;
|
3255 |
|
|
T typedef typename Allocator::const_reference const_reference;
|
3256 |
|
|
T typedef implementation defined iterator;
|
3257 |
|
|
T typedef implementation defined const_iterator;
|
3258 |
|
|
T typedef implementation defined size_type;
|
3259 |
|
|
T typedef implementation defined difference_type;
|
3260 |
|
|
T typedef typename Allocator::pointer pointer;
|
3261 |
|
|
T typedef typename Allocator::const_pointer const_pointer;
|
3262 |
|
|
T typedef std::reverse_iterator reverse_iterator;
|
3263 |
|
|
T typedef std::reverse_iterator const_reverse_iterator;
|
3264 |
|
|
// _lib.set.cons_ construct/copy/destroy:
|
3265 |
|
|
T explicit set(const Compare& comp = Compare(),
|
3266 |
|
|
const Allocator& = Allocator());
|
3267 |
|
|
T template
|
3268 |
|
|
set(InputIterator first, InputIterator last,
|
3269 |
|
|
const Compare& comp = Compare(), const Allocator& = Allocator());
|
3270 |
|
|
T set(const set& x);
|
3271 |
|
|
T ~set();
|
3272 |
|
|
T set&
|
3273 |
|
|
operator=(const set& x);
|
3274 |
|
|
T allocator_type get_allocator() const;
|
3275 |
|
|
// iterators:
|
3276 |
|
|
T iterator begin();
|
3277 |
|
|
T const_iterator begin() const;
|
3278 |
|
|
T iterator end();
|
3279 |
|
|
T const_iterator end() const;
|
3280 |
|
|
T reverse_iterator rbegin();
|
3281 |
|
|
T const_reverse_iterator rbegin() const;
|
3282 |
|
|
T reverse_iterator rend();
|
3283 |
|
|
T const_reverse_iterator rend() const;
|
3284 |
|
|
// capacity:
|
3285 |
|
|
T bool empty() const;
|
3286 |
|
|
T size_type size() const;
|
3287 |
|
|
T size_type max_size() const;
|
3288 |
|
|
// modifiers:
|
3289 |
|
|
T pair insert(const value_type& x);
|
3290 |
|
|
T iterator insert(iterator position, const value_type& x);
|
3291 |
|
|
T template
|
3292 |
|
|
T void insert(InputIterator first, InputIterator last);
|
3293 |
|
|
T void erase(iterator position);
|
3294 |
|
|
T size_type erase(const key_type& x);
|
3295 |
|
|
T void erase(iterator first, iterator last);
|
3296 |
|
|
T void swap(set&);
|
3297 |
|
|
T void clear();
|
3298 |
|
|
|
3299 |
|
|
// observers:
|
3300 |
|
|
T key_compare key_comp() const;
|
3301 |
|
|
T value_compare value_comp() const;
|
3302 |
|
|
// set operations:
|
3303 |
|
|
T iterator find(const key_type& x) const;
|
3304 |
|
|
T size_type count(const key_type& x) const;
|
3305 |
|
|
T iterator lower_bound(const key_type& x) const;
|
3306 |
|
|
T iterator upper_bound(const key_type& x) const;
|
3307 |
|
|
T pair equal_range(const key_type& x) const;
|
3308 |
|
|
};
|
3309 |
|
|
T template
|
3310 |
|
|
bool operator==(const set& x,
|
3311 |
|
|
const set& y);
|
3312 |
|
|
T template
|
3313 |
|
|
bool operator< (const set& x,
|
3314 |
|
|
const set& y);
|
3315 |
|
|
T template
|
3316 |
|
|
bool operator!=(const set& x,
|
3317 |
|
|
const set& y);
|
3318 |
|
|
T template
|
3319 |
|
|
bool operator> (const set& x,
|
3320 |
|
|
const set& y);
|
3321 |
|
|
T template
|
3322 |
|
|
bool operator>=(const set& x,
|
3323 |
|
|
const set& y);
|
3324 |
|
|
T template
|
3325 |
|
|
bool operator<=(const set& x,
|
3326 |
|
|
const set& y);
|
3327 |
|
|
// specialized algorithms:
|
3328 |
|
|
T template
|
3329 |
|
|
void swap(set& x,
|
3330 |
|
|
set& y);
|
3331 |
|
|
|
3332 |
|
|
23.3.4 Template class multiset [lib.multiset]
|
3333 |
|
|
|
3334 |
|
|
template ,
|
3335 |
|
|
class Allocator = allocator >
|
3336 |
|
|
T class multiset {
|
3337 |
|
|
public:
|
3338 |
|
|
// types:
|
3339 |
|
|
T typedef Key key_type;
|
3340 |
|
|
T typedef Key value_type;
|
3341 |
|
|
T typedef Compare key_compare;
|
3342 |
|
|
T typedef Compare value_compare;
|
3343 |
|
|
T typedef Allocator allocator_type;
|
3344 |
|
|
T typedef typename Allocator::reference reference;
|
3345 |
|
|
T typedef typename Allocator::const_reference const_reference;
|
3346 |
|
|
T typedef implementation defined iterator;
|
3347 |
|
|
T typedef implementation defined const_iterator;
|
3348 |
|
|
T typedef implementation defined size_type;
|
3349 |
|
|
T typedef implementation defined difference_type
|
3350 |
|
|
T typedef typename Allocator::pointer pointer;
|
3351 |
|
|
T typedef typename Allocator::const_pointer const_pointer;
|
3352 |
|
|
T typedef std::reverse_iterator reverse_iterator;
|
3353 |
|
|
T typedef std::reverse_iterator const_reverse_iterator;
|
3354 |
|
|
|
3355 |
|
|
// construct/copy/destroy:
|
3356 |
|
|
T explicit multiset(const Compare& comp = Compare(),
|
3357 |
|
|
const Allocator& = Allocator());
|
3358 |
|
|
T template
|
3359 |
|
|
multiset(InputIterator first, InputIterator last,
|
3360 |
|
|
const Compare& comp = Compare(),
|
3361 |
|
|
const Allocator& = Allocator());
|
3362 |
|
|
T multiset(const multiset& x);
|
3363 |
|
|
T ~multiset();
|
3364 |
|
|
T multiset&
|
3365 |
|
|
operator=(const multiset& x);
|
3366 |
|
|
T allocator_type get_allocator() const;
|
3367 |
|
|
// iterators:
|
3368 |
|
|
T iterator begin();
|
3369 |
|
|
T const_iterator begin() const;
|
3370 |
|
|
T iterator end();
|
3371 |
|
|
T const_iterator end() const;
|
3372 |
|
|
T reverse_iterator rbegin();
|
3373 |
|
|
T const_reverse_iterator rbegin() const;
|
3374 |
|
|
T reverse_iterator rend();
|
3375 |
|
|
T const_reverse_iterator rend() const;
|
3376 |
|
|
// capacity:
|
3377 |
|
|
T bool empty() const;
|
3378 |
|
|
T size_type size() const;
|
3379 |
|
|
T size_type max_size() const;
|
3380 |
|
|
// modifiers:
|
3381 |
|
|
T iterator insert(const value_type& x);
|
3382 |
|
|
T iterator insert(iterator position, const value_type& x);
|
3383 |
|
|
T template
|
3384 |
|
|
void insert(InputIterator first, InputIterator last);
|
3385 |
|
|
T void erase(iterator position);
|
3386 |
|
|
T size_type erase(const key_type& x);
|
3387 |
|
|
T void erase(iterator first, iterator last);
|
3388 |
|
|
T void swap(multiset&);
|
3389 |
|
|
T void clear();
|
3390 |
|
|
// observers:
|
3391 |
|
|
T key_compare key_comp() const;
|
3392 |
|
|
T value_compare value_comp() const;
|
3393 |
|
|
// set operations:
|
3394 |
|
|
T iterator find(const key_type& x) const;
|
3395 |
|
|
T size_type count(const key_type& x) const;
|
3396 |
|
|
T iterator lower_bound(const key_type& x) const;
|
3397 |
|
|
T iterator upper_bound(const key_type& x) const;
|
3398 |
|
|
T pair equal_range(const key_type& x) const;
|
3399 |
|
|
};
|
3400 |
|
|
|
3401 |
|
|
T template
|
3402 |
|
|
bool operator==(const multiset& x,
|
3403 |
|
|
const multiset& y);
|
3404 |
|
|
T template
|
3405 |
|
|
bool operator< (const multiset& x,
|
3406 |
|
|
const multiset& y);
|
3407 |
|
|
T template
|
3408 |
|
|
bool operator!=(const multiset& x,
|
3409 |
|
|
const multiset& y);
|
3410 |
|
|
T template
|
3411 |
|
|
bool operator> (const multiset& x,
|
3412 |
|
|
const multiset& y);
|
3413 |
|
|
T template
|
3414 |
|
|
bool operator>=(const multiset& x,
|
3415 |
|
|
const multiset& y);
|
3416 |
|
|
T template
|
3417 |
|
|
bool operator<=(const multiset& x,
|
3418 |
|
|
const multiset& y);
|
3419 |
|
|
// specialized algorithms:
|
3420 |
|
|
T template
|
3421 |
|
|
void swap(multiset& x,
|
3422 |
|
|
multiset& y);
|
3423 |
|
|
|
3424 |
|
|
23.3.5 Template class bitset [lib.template.bitset]
|
3425 |
|
|
|
3426 |
|
|
Header synopsis
|
3427 |
|
|
|
3428 |
|
|
T template class bitset;
|
3429 |
|
|
// _lib.bitset.operators_ bitset operations:
|
3430 |
|
|
T template
|
3431 |
|
|
bitset operator&(const bitset&, const bitset&);
|
3432 |
|
|
T template
|
3433 |
|
|
bitset operator|(const bitset&, const bitset&);
|
3434 |
|
|
T template
|
3435 |
|
|
bitset operator^(const bitset&, const bitset&);
|
3436 |
|
|
T template
|
3437 |
|
|
basic_istream&
|
3438 |
|
|
operator>>(basic_istream& is, bitset& x);
|
3439 |
|
|
T template
|
3440 |
|
|
basic_ostream&
|
3441 |
|
|
operator<<(basic_ostream& os, const bitset& x);
|
3442 |
|
|
|
3443 |
|
|
T template class bitset {
|
3444 |
|
|
public:
|
3445 |
|
|
// bit reference:
|
3446 |
|
|
T class reference {
|
3447 |
|
|
friend class bitset;
|
3448 |
|
|
T reference();
|
3449 |
|
|
public:
|
3450 |
|
|
T ~reference();
|
3451 |
|
|
T reference& operator=(bool x); // for b[i] = x;
|
3452 |
|
|
T reference& operator=(const reference&); // for b[i] = b[j];
|
3453 |
|
|
T bool operator~() const; // flips the bit
|
3454 |
|
|
T operator bool() const; // for x = b[i];
|
3455 |
|
|
T reference& flip(); // for b[i].flip();
|
3456 |
|
|
};
|
3457 |
|
|
|
3458 |
|
|
// _lib.bitset.cons_ constructors:
|
3459 |
|
|
T bitset();
|
3460 |
|
|
T bitset(unsigned long val);
|
3461 |
|
|
T template
|
3462 |
|
|
explicit bitset(
|
3463 |
|
|
const basic_string& str,
|
3464 |
|
|
typename basic_string::size_type pos = 0,
|
3465 |
|
|
typename basic_string::size_type n =
|
3466 |
|
|
basic_string::npos);
|
3467 |
|
|
// _lib.bitset.members_ bitset operations:
|
3468 |
|
|
T bitset& operator&=(const bitset& rhs);
|
3469 |
|
|
T bitset& operator|=(const bitset& rhs);
|
3470 |
|
|
T bitset& operator^=(const bitset& rhs);
|
3471 |
|
|
T bitset& operator<<=(size_t pos);
|
3472 |
|
|
T bitset& operator>>=(size_t pos);
|
3473 |
|
|
T bitset& set();
|
3474 |
|
|
T bitset& set(size_t pos, int val = true);
|
3475 |
|
|
T bitset& reset();
|
3476 |
|
|
T bitset& reset(size_t pos);
|
3477 |
|
|
T bitset operator~() const;
|
3478 |
|
|
T bitset& flip();
|
3479 |
|
|
T bitset& flip(size_t pos);
|
3480 |
|
|
// element access:
|
3481 |
|
|
T reference operator[](size_t pos); // for b[i];
|
3482 |
|
|
T unsigned long to_ulong() const;
|
3483 |
|
|
T template
|
3484 |
|
|
basic_string to_string() const;
|
3485 |
|
|
T size_t count() const;
|
3486 |
|
|
T size_t size() const;
|
3487 |
|
|
T bool operator==(const bitset& rhs) const;
|
3488 |
|
|
T bool operator!=(const bitset& rhs) const;
|
3489 |
|
|
T bool test(size_t pos) const;
|
3490 |
|
|
T bool any() const;
|
3491 |
|
|
T bool none() const;
|
3492 |
|
|
T bitset operator<<(size_t pos) const;
|
3493 |
|
|
T bitset operator>>(size_t pos) const;
|
3494 |
|
|
};
|
3495 |
|
|
|
3496 |
|
|
|
3497 |
|
|
|
3498 |
|
|
|
3499 |
|
|
24.2 Header synopsis [lib.iterator.synopsis]
|
3500 |
|
|
|
3501 |
|
|
// _lib.iterator.primitives_, primitives:
|
3502 |
|
|
T template struct iterator_traits;
|
3503 |
|
|
T template struct iterator_traits;
|
3504 |
|
|
|
3505 |
|
|
X template
|
3506 |
|
|
class Pointer = T*, class Reference = T&> struct iterator;
|
3507 |
|
|
T struct input_iterator_tag {};
|
3508 |
|
|
T struct output_iterator_tag {};
|
3509 |
|
|
T struct forward_iterator_tag: public input_iterator_tag {};
|
3510 |
|
|
T struct bidirectional_iterator_tag: public forward_iterator_tag {};
|
3511 |
|
|
T struct random_access_iterator_tag: public bidirectional_iterator_tag {};
|
3512 |
|
|
// _lib.iterator.operations_, iterator operations:
|
3513 |
|
|
T template
|
3514 |
|
|
void advance(InputIterator& i, Distance n);
|
3515 |
|
|
T template
|
3516 |
|
|
typename iterator_traits::difference_type
|
3517 |
|
|
distance(InputIterator first, InputIterator last);
|
3518 |
|
|
// _lib.predef.iterators_, predefined iterators:
|
3519 |
|
|
X template class reverse_iterator;
|
3520 |
|
|
T template
|
3521 |
|
|
bool operator==(
|
3522 |
|
|
const reverse_iterator& x,
|
3523 |
|
|
const reverse_iterator& y);
|
3524 |
|
|
T template
|
3525 |
|
|
bool operator<(
|
3526 |
|
|
const reverse_iterator& x,
|
3527 |
|
|
const reverse_iterator& y);
|
3528 |
|
|
T template
|
3529 |
|
|
bool operator!=(
|
3530 |
|
|
const reverse_iterator& x,
|
3531 |
|
|
const reverse_iterator& y);
|
3532 |
|
|
T template
|
3533 |
|
|
bool operator>(
|
3534 |
|
|
const reverse_iterator& x,
|
3535 |
|
|
const reverse_iterator& y);
|
3536 |
|
|
T template
|
3537 |
|
|
bool operator>=(
|
3538 |
|
|
const reverse_iterator& x,
|
3539 |
|
|
const reverse_iterator& y);
|
3540 |
|
|
T template
|
3541 |
|
|
bool operator<=(
|
3542 |
|
|
const reverse_iterator& x,
|
3543 |
|
|
const reverse_iterator& y);
|
3544 |
|
|
T template
|
3545 |
|
|
typename reverse_iterator::difference_type operator-(
|
3546 |
|
|
const reverse_iterator& x,
|
3547 |
|
|
const reverse_iterator& y);
|
3548 |
|
|
T template
|
3549 |
|
|
reverse_iterator
|
3550 |
|
|
operator+(
|
3551 |
|
|
typename reverse_iterator::difference_type n,
|
3552 |
|
|
const reverse_iterator& x);
|
3553 |
|
|
|
3554 |
|
|
X template class back_insert_iterator;
|
3555 |
|
|
T template
|
3556 |
|
|
back_insert_iterator back_inserter(Container& x);
|
3557 |
|
|
X template class front_insert_iterator;
|
3558 |
|
|
T template
|
3559 |
|
|
front_insert_iterator front_inserter(Container& x);
|
3560 |
|
|
X template class insert_iterator;
|
3561 |
|
|
T template
|
3562 |
|
|
insert_iterator inserter(Container& x, Iterator i);
|
3563 |
|
|
// _lib.stream.iterators_, stream iterators:
|
3564 |
|
|
X template ,
|
3565 |
|
|
class Distance = ptrdiff_t>
|
3566 |
|
|
class istream_iterator;
|
3567 |
|
|
template
|
3568 |
|
|
X bool operator==(const istream_iterator& x,
|
3569 |
|
|
const istream_iterator& y);
|
3570 |
|
|
template
|
3571 |
|
|
X bool operator!=(const istream_iterator& x,
|
3572 |
|
|
const istream_iterator& y);
|
3573 |
|
|
X template >
|
3574 |
|
|
class ostream_iterator;
|
3575 |
|
|
X template >
|
3576 |
|
|
class istreambuf_iterator;
|
3577 |
|
|
X template
|
3578 |
|
|
bool operator==(const istreambuf_iterator& a,
|
3579 |
|
|
const istreambuf_iterator& b);
|
3580 |
|
|
X template
|
3581 |
|
|
bool operator!=(const istreambuf_iterator& a,
|
3582 |
|
|
const istreambuf_iterator& b);
|
3583 |
|
|
T template >
|
3584 |
|
|
class ostreambuf_iterator;
|
3585 |
|
|
|
3586 |
|
|
24.3 Iterator primitives [lib.iterator.primitives]
|
3587 |
|
|
|
3588 |
|
|
T template struct iterator_traits {
|
3589 |
|
|
T typedef typename Iterator::difference_type difference_type;
|
3590 |
|
|
T typedef typename Iterator::value_type value_type;
|
3591 |
|
|
T typedef typename Iterator::pointer pointer;
|
3592 |
|
|
T typedef typename Iterator::reference reference;
|
3593 |
|
|
T typedef typename Iterator::iterator_category iterator_category;
|
3594 |
|
|
};
|
3595 |
|
|
|
3596 |
|
|
T template struct iterator_traits {
|
3597 |
|
|
T typedef ptrdiff_t difference_type;
|
3598 |
|
|
T typedef T value_type;
|
3599 |
|
|
T typedef T* pointer;
|
3600 |
|
|
T typedef T& reference;
|
3601 |
|
|
T typedef random_access_iterator_tag iterator_category;
|
3602 |
|
|
};
|
3603 |
|
|
|
3604 |
|
|
T template struct iterator_traits {
|
3605 |
|
|
T typedef ptrdiff_t difference_type;
|
3606 |
|
|
T typedef T value_type;
|
3607 |
|
|
T typedef const T* pointer;
|
3608 |
|
|
T typedef const T& reference;
|
3609 |
|
|
T typedef random_access_iterator_tag iterator_category;
|
3610 |
|
|
};
|
3611 |
|
|
|
3612 |
|
|
24.3.2 Basic iterator [lib.iterator.basic]
|
3613 |
|
|
|
3614 |
|
|
template
|
3615 |
|
|
class Pointer = T*, class Reference = T&>
|
3616 |
|
|
X struct iterator {
|
3617 |
|
|
T typedef T value_type;
|
3618 |
|
|
T typedef Distance difference_type;
|
3619 |
|
|
T typedef Pointer pointer;
|
3620 |
|
|
T typedef Reference reference;
|
3621 |
|
|
T typedef Category iterator_category;
|
3622 |
|
|
};
|
3623 |
|
|
|
3624 |
|
|
24.3.3 Standard iterator tags [lib.std.iterator.tags]
|
3625 |
|
|
|
3626 |
|
|
T struct input_iterator_tag {};
|
3627 |
|
|
T struct output_iterator_tag {};
|
3628 |
|
|
T struct forward_iterator_tag: public input_iterator_tag {};
|
3629 |
|
|
T struct bidirectional_iterator_tag: public forward_iterator_tag {};
|
3630 |
|
|
T struct random_access_iterator_tag: public bidirectional_iterator_tag {};
|
3631 |
|
|
|
3632 |
|
|
|
3633 |
|
|
24.4.1 Reverse iterators [lib.reverse.iterators]
|
3634 |
|
|
|
3635 |
|
|
template
|
3636 |
|
|
X class reverse_iterator : public
|
3637 |
|
|
iterator::iterator_category,
|
3638 |
|
|
typename iterator_traits::value_type,
|
3639 |
|
|
typename iterator_traits::difference_type,
|
3640 |
|
|
typename iterator_traits::pointer,
|
3641 |
|
|
typename iterator_traits::reference> {
|
3642 |
|
|
protected:
|
3643 |
|
|
T Iterator current;
|
3644 |
|
|
public:
|
3645 |
|
|
T typedef Iterator
|
3646 |
|
|
iterator_type;
|
3647 |
|
|
T typedef typename iterator_traits::difference_type
|
3648 |
|
|
difference_type;
|
3649 |
|
|
T typedef typename iterator_traits::reference
|
3650 |
|
|
reference;
|
3651 |
|
|
T typedef typename iterator_traits::pointer
|
3652 |
|
|
pointer;
|
3653 |
|
|
|
3654 |
|
|
T reverse_iterator();
|
3655 |
|
|
T explicit reverse_iterator(Iterator x);
|
3656 |
|
|
T template reverse_iterator(const reverse_iterator& u);
|
3657 |
|
|
T Iterator base() const; // explicit
|
3658 |
|
|
T reference operator*() const;
|
3659 |
|
|
T pointer operator->() const;
|
3660 |
|
|
T reverse_iterator& operator++();
|
3661 |
|
|
T reverse_iterator operator++(int);
|
3662 |
|
|
T reverse_iterator& operator--();
|
3663 |
|
|
T reverse_iterator operator--(int);
|
3664 |
|
|
|
3665 |
|
|
T reverse_iterator operator+ (difference_type n) const;
|
3666 |
|
|
T reverse_iterator& operator+=(difference_type n);
|
3667 |
|
|
T reverse_iterator operator- (difference_type n) const;
|
3668 |
|
|
T reverse_iterator& operator-=(difference_type n);
|
3669 |
|
|
T reference operator[](difference_type n) const;
|
3670 |
|
|
};
|
3671 |
|
|
T template
|
3672 |
|
|
bool operator==(
|
3673 |
|
|
const reverse_iterator& x,
|
3674 |
|
|
const reverse_iterator& y);
|
3675 |
|
|
T template
|
3676 |
|
|
bool operator<(
|
3677 |
|
|
const reverse_iterator& x,
|
3678 |
|
|
const reverse_iterator& y);
|
3679 |
|
|
T template
|
3680 |
|
|
bool operator!=(
|
3681 |
|
|
const reverse_iterator& x,
|
3682 |
|
|
const reverse_iterator& y);
|
3683 |
|
|
T template
|
3684 |
|
|
bool operator>(
|
3685 |
|
|
const reverse_iterator& x,
|
3686 |
|
|
const reverse_iterator& y);
|
3687 |
|
|
T template
|
3688 |
|
|
bool operator>=(
|
3689 |
|
|
const reverse_iterator& x,
|
3690 |
|
|
const reverse_iterator& y);
|
3691 |
|
|
T template
|
3692 |
|
|
bool operator<=(
|
3693 |
|
|
const reverse_iterator& x,
|
3694 |
|
|
const reverse_iterator& y);
|
3695 |
|
|
T template
|
3696 |
|
|
typename reverse_iterator::difference_type operator-(
|
3697 |
|
|
const reverse_iterator& x,
|
3698 |
|
|
const reverse_iterator& y);
|
3699 |
|
|
T template
|
3700 |
|
|
reverse_iterator operator+(
|
3701 |
|
|
typename reverse_iterator::difference_type n,
|
3702 |
|
|
const reverse_iterator& x);
|
3703 |
|
|
|
3704 |
|
|
|
3705 |
|
|
24.4.2.1 Template class [lib.back.insert.iterator]
|
3706 |
|
|
back_insert_iterator
|
3707 |
|
|
|
3708 |
|
|
template
|
3709 |
|
|
X class back_insert_iterator :
|
3710 |
|
|
public iterator {
|
3711 |
|
|
protected:
|
3712 |
|
|
T Container* container;
|
3713 |
|
|
public:
|
3714 |
|
|
T typedef Container container_type;
|
3715 |
|
|
T explicit back_insert_iterator(Container& x);
|
3716 |
|
|
T back_insert_iterator&
|
3717 |
|
|
operator=(typename Container::const_reference value);
|
3718 |
|
|
|
3719 |
|
|
T back_insert_iterator& operator*();
|
3720 |
|
|
T back_insert_iterator& operator++();
|
3721 |
|
|
T back_insert_iterator operator++(int);
|
3722 |
|
|
};
|
3723 |
|
|
T template
|
3724 |
|
|
back_insert_iterator back_inserter(Container& x);
|
3725 |
|
|
|
3726 |
|
|
|
3727 |
|
|
|
3728 |
|
|
24.4.2.3 Template class [lib.front.insert.iterator]
|
3729 |
|
|
front_insert_iterator
|
3730 |
|
|
|
3731 |
|
|
template
|
3732 |
|
|
X class front_insert_iterator :
|
3733 |
|
|
public iterator {
|
3734 |
|
|
protected:
|
3735 |
|
|
T Container* container;
|
3736 |
|
|
public:
|
3737 |
|
|
T typedef Container container_type;
|
3738 |
|
|
T explicit front_insert_iterator(Container& x);
|
3739 |
|
|
T front_insert_iterator&
|
3740 |
|
|
operator=(typename Container::const_reference value);
|
3741 |
|
|
T front_insert_iterator& operator*();
|
3742 |
|
|
T front_insert_iterator& operator++();
|
3743 |
|
|
T front_insert_iterator operator++(int);
|
3744 |
|
|
};
|
3745 |
|
|
T template
|
3746 |
|
|
front_insert_iterator front_inserter(Container& x);
|
3747 |
|
|
|
3748 |
|
|
|
3749 |
|
|
24.4.2.5 Template class insert_iterator [lib.insert.iterator]
|
3750 |
|
|
|
3751 |
|
|
template
|
3752 |
|
|
X class insert_iterator :
|
3753 |
|
|
public iterator {
|
3754 |
|
|
protected:
|
3755 |
|
|
T Container* container;
|
3756 |
|
|
T typename Container::iterator iter;
|
3757 |
|
|
public:
|
3758 |
|
|
T typedef Container container_type;
|
3759 |
|
|
T insert_iterator(Container& x, typename Container::iterator i);
|
3760 |
|
|
T insert_iterator&
|
3761 |
|
|
operator=(typename Container::const_reference value);
|
3762 |
|
|
T insert_iterator& operator*();
|
3763 |
|
|
T insert_iterator& operator++();
|
3764 |
|
|
T insert_iterator& operator++(int);
|
3765 |
|
|
};
|
3766 |
|
|
T template
|
3767 |
|
|
insert_iterator inserter(Container& x, Iterator i);
|
3768 |
|
|
|
3769 |
|
|
24.5.1 Template class istream_iterator [lib.istream.iterator]
|
3770 |
|
|
|
3771 |
|
|
template ,
|
3772 |
|
|
class Distance = ptrdiff_t>
|
3773 |
|
|
X class istream_iterator:
|
3774 |
|
|
public iterator {
|
3775 |
|
|
public:
|
3776 |
|
|
T typedef charT char_type
|
3777 |
|
|
T typedef traits traits_type;
|
3778 |
|
|
T typedef basic_istream istream_type;
|
3779 |
|
|
T istream_iterator();
|
3780 |
|
|
T istream_iterator(istream_type& s);
|
3781 |
|
|
T istream_iterator(const istream_iterator& x);
|
3782 |
|
|
T ~istream_iterator();
|
3783 |
|
|
|
3784 |
|
|
T const T& operator*() const;
|
3785 |
|
|
T const T* operator->() const;
|
3786 |
|
|
T istream_iterator& operator++();
|
3787 |
|
|
T istream_iterator operator++(int);
|
3788 |
|
|
};
|
3789 |
|
|
|
3790 |
|
|
T template
|
3791 |
|
|
bool operator==(const istream_iterator& x,
|
3792 |
|
|
const istream_iterator& y);
|
3793 |
|
|
T template
|
3794 |
|
|
bool operator!=(const istream_iterator& x,
|
3795 |
|
|
const istream_iterator& y);
|
3796 |
|
|
|
3797 |
|
|
|
3798 |
|
|
24.5.2 Template class ostream_iterator [lib.ostream.iterator]
|
3799 |
|
|
|
3800 |
|
|
template >
|
3801 |
|
|
X class ostream_iterator:
|
3802 |
|
|
public iterator {
|
3803 |
|
|
public:
|
3804 |
|
|
T typedef charT char_type;
|
3805 |
|
|
T typedef traits traits_type;
|
3806 |
|
|
T typedef basic_ostream ostream_type;
|
3807 |
|
|
T ostream_iterator(ostream_type& s);
|
3808 |
|
|
T ostream_iterator(ostream_type& s, const charT* delimiter);
|
3809 |
|
|
T ostream_iterator(const ostream_iterator& x);
|
3810 |
|
|
T ~ostream_iterator();
|
3811 |
|
|
T ostream_iterator& operator=(const T& value);
|
3812 |
|
|
|
3813 |
|
|
T ostream_iterator& operator*();
|
3814 |
|
|
T ostream_iterator& operator++();
|
3815 |
|
|
T ostream_iterator& operator++(int);
|
3816 |
|
|
};
|
3817 |
|
|
|
3818 |
|
|
|
3819 |
|
|
24.5.3 Template class [lib.istreambuf.iterator]
|
3820 |
|
|
istreambuf_iterator
|
3821 |
|
|
|
3822 |
|
|
template >
|
3823 |
|
|
X class istreambuf_iterator
|
3824 |
|
|
: public iterator
|
3825 |
|
|
typename traits::off_type, charT*, charT&> {
|
3826 |
|
|
public:
|
3827 |
|
|
T typedef charT char_type;
|
3828 |
|
|
T typedef traits traits_type;
|
3829 |
|
|
T typedef typename traits::int_type int_type;
|
3830 |
|
|
T typedef basic_streambuf streambuf_type;
|
3831 |
|
|
T typedef basic_istream istream_type;
|
3832 |
|
|
T class proxy; // exposition only
|
3833 |
|
|
T istreambuf_iterator() throw();
|
3834 |
|
|
T istreambuf_iterator(istream_type& s) throw();
|
3835 |
|
|
T istreambuf_iterator(streambuf_type* s) throw();
|
3836 |
|
|
T istreambuf_iterator(const proxy& p) throw();
|
3837 |
|
|
T charT operator*() const;
|
3838 |
|
|
T istreambuf_iterator& operator++();
|
3839 |
|
|
T proxy operator++(int);
|
3840 |
|
|
X bool equal(istreambuf_iterator& b);
|
3841 |
|
|
};
|
3842 |
|
|
|
3843 |
|
|
T template
|
3844 |
|
|
bool operator==(const istreambuf_iterator& a,
|
3845 |
|
|
const istreambuf_iterator& b);
|
3846 |
|
|
|
3847 |
|
|
T template
|
3848 |
|
|
bool operator!=(const istreambuf_iterator& a,
|
3849 |
|
|
const istreambuf_iterator& b);
|
3850 |
|
|
|
3851 |
|
|
24.5.3.1 Template class [lib.istreambuf.iterator::proxy]
|
3852 |
|
|
istreambuf_iterator::proxy
|
3853 |
|
|
|
3854 |
|
|
template >
|
3855 |
|
|
T class istreambuf_iterator::proxy
|
3856 |
|
|
{
|
3857 |
|
|
T charT keep_;
|
3858 |
|
|
T basic_streambuf* sbuf_;
|
3859 |
|
|
T proxy(charT c,
|
3860 |
|
|
basic_streambuf* sbuf);
|
3861 |
|
|
: keep_(c), sbuf_(sbuf) {}
|
3862 |
|
|
public:
|
3863 |
|
|
T charT operator*() { return keep_; }
|
3864 |
|
|
};
|
3865 |
|
|
|
3866 |
|
|
|
3867 |
|
|
|
3868 |
|
|
24.5.4 Template class [lib.ostreambuf.iterator]
|
3869 |
|
|
ostreambuf_iterator
|
3870 |
|
|
|
3871 |
|
|
template >
|
3872 |
|
|
T class ostreambuf_iterator:
|
3873 |
|
|
public iterator {
|
3874 |
|
|
public:
|
3875 |
|
|
T typedef charT char_type;
|
3876 |
|
|
T typedef traits traits_type;
|
3877 |
|
|
T typedef basic_streambuf streambuf_type;
|
3878 |
|
|
T typedef basic_ostream ostream_type;
|
3879 |
|
|
public:
|
3880 |
|
|
T ostreambuf_iterator(ostream_type& s) throw();
|
3881 |
|
|
T ostreambuf_iterator(streambuf_type* s) throw();
|
3882 |
|
|
T ostreambuf_iterator& operator=(charT c);
|
3883 |
|
|
T ostreambuf_iterator& operator*();
|
3884 |
|
|
T ostreambuf_iterator& operator++();
|
3885 |
|
|
T ostreambuf_iterator& operator++(int);
|
3886 |
|
|
T bool failed() const throw();
|
3887 |
|
|
};
|
3888 |
|
|
|
3889 |
|
|
|
3890 |
|
|
Header synopsis
|
3891 |
|
|
|
3892 |
|
|
|
3893 |
|
|
// _lib.alg.nonmodifying_, non-modifying sequence operations:
|
3894 |
|
|
T template
|
3895 |
|
|
Function for_each(InputIterator first, InputIterator last, Function f);
|
3896 |
|
|
T template
|
3897 |
|
|
InputIterator find(InputIterator first, InputIterator last,
|
3898 |
|
|
const T& value);
|
3899 |
|
|
T template
|
3900 |
|
|
InputIterator find_if(InputIterator first, InputIterator last,
|
3901 |
|
|
Predicate pred);
|
3902 |
|
|
T template
|
3903 |
|
|
ForwardIterator1
|
3904 |
|
|
find_end(ForwardIterator1 first1, ForwardIterator1 last1,
|
3905 |
|
|
ForwardIterator2 first2, ForwardIterator2 last2);
|
3906 |
|
|
T template
|
3907 |
|
|
class BinaryPredicate>
|
3908 |
|
|
ForwardIterator1
|
3909 |
|
|
find_end(ForwardIterator1 first1, ForwardIterator1 last1,
|
3910 |
|
|
ForwardIterator2 first2, ForwardIterator2 last2,
|
3911 |
|
|
BinaryPredicate pred);
|
3912 |
|
|
T template
|
3913 |
|
|
ForwardIterator1
|
3914 |
|
|
find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
|
3915 |
|
|
ForwardIterator2 first2, ForwardIterator2 last2);
|
3916 |
|
|
T template
|
3917 |
|
|
class BinaryPredicate>
|
3918 |
|
|
ForwardIterator1
|
3919 |
|
|
find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
|
3920 |
|
|
ForwardIterator2 first2, ForwardIterator2 last2,
|
3921 |
|
|
BinaryPredicate pred);
|
3922 |
|
|
T template
|
3923 |
|
|
ForwardIterator adjacent_find(ForwardIterator first,
|
3924 |
|
|
ForwardIterator last);
|
3925 |
|
|
T template
|
3926 |
|
|
ForwardIterator adjacent_find(ForwardIterator first,
|
3927 |
|
|
ForwardIterator last, BinaryPredicate pred);
|
3928 |
|
|
T template
|
3929 |
|
|
typename iterator_traits::difference_type
|
3930 |
|
|
count(InputIterator first, InputIterator last, const T& value);
|
3931 |
|
|
T template
|
3932 |
|
|
typename iterator_traits::difference_type
|
3933 |
|
|
count_if(InputIterator first, InputIterator last, Predicate pred);
|
3934 |
|
|
T template
|
3935 |
|
|
pair
|
3936 |
|
|
mismatch(InputIterator1 first1, InputIterator1 last1,
|
3937 |
|
|
InputIterator2 first2);
|
3938 |
|
|
T template
|
3939 |
|
|
pair
|
3940 |
|
|
mismatch(InputIterator1 first1, InputIterator1 last1,
|
3941 |
|
|
InputIterator2 first2, BinaryPredicate pred);
|
3942 |
|
|
|
3943 |
|
|
T template
|
3944 |
|
|
bool equal(InputIterator1 first1, InputIterator1 last1,
|
3945 |
|
|
InputIterator2 first2);
|
3946 |
|
|
T template
|
3947 |
|
|
bool equal(InputIterator1 first1, InputIterator1 last1,
|
3948 |
|
|
InputIterator2 first2, BinaryPredicate pred);
|
3949 |
|
|
T template
|
3950 |
|
|
ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1,
|
3951 |
|
|
ForwardIterator2 first2, ForwardIterator2 last2);
|
3952 |
|
|
T template
|
3953 |
|
|
class BinaryPredicate>
|
3954 |
|
|
ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1,
|
3955 |
|
|
ForwardIterator2 first2, ForwardIterator2 last2,
|
3956 |
|
|
BinaryPredicate pred);
|
3957 |
|
|
T template
|
3958 |
|
|
ForwardIterator search_n(ForwardIterator first, ForwardIterator last,
|
3959 |
|
|
Size count, const T& value);
|
3960 |
|
|
T template
|
3961 |
|
|
ForwardIterator1 search_n(ForwardIterator first, ForwardIterator last,
|
3962 |
|
|
Size count, const T& value,
|
3963 |
|
|
BinaryPredicate pred);
|
3964 |
|
|
// _lib.alg.modifying.operations_, modifying sequence operations:
|
3965 |
|
|
// _lib.alg.copy_, copy:
|
3966 |
|
|
T template
|
3967 |
|
|
OutputIterator copy(InputIterator first, InputIterator last,
|
3968 |
|
|
OutputIterator result);
|
3969 |
|
|
T template
|
3970 |
|
|
BidirectionalIterator2
|
3971 |
|
|
copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last,
|
3972 |
|
|
BidirectionalIterator2 result);
|
3973 |
|
|
// _lib.alg.swap_, swap:
|
3974 |
|
|
T template void swap(T& a, T& b);
|
3975 |
|
|
T template
|
3976 |
|
|
ForwardIterator2 swap_ranges(ForwardIterator1 first1,
|
3977 |
|
|
ForwardIterator1 last1, ForwardIterator2 first2);
|
3978 |
|
|
T template
|
3979 |
|
|
void iter_swap(ForwardIterator1 a, ForwardIterator2 b);
|
3980 |
|
|
T template
|
3981 |
|
|
OutputIterator transform(InputIterator first, InputIterator last,
|
3982 |
|
|
OutputIterator result, UnaryOperation op);
|
3983 |
|
|
T template
|
3984 |
|
|
class BinaryOperation>
|
3985 |
|
|
OutputIterator transform(InputIterator1 first1, InputIterator1 last1,
|
3986 |
|
|
InputIterator2 first2, OutputIterator result,
|
3987 |
|
|
BinaryOperation binary_op);
|
3988 |
|
|
|
3989 |
|
|
T template
|
3990 |
|
|
void replace(ForwardIterator first, ForwardIterator last,
|
3991 |
|
|
const T& old_value, const T& new_value);
|
3992 |
|
|
T template
|
3993 |
|
|
void replace_if(ForwardIterator first, ForwardIterator last,
|
3994 |
|
|
Predicate pred, const T& new_value);
|
3995 |
|
|
T template
|
3996 |
|
|
OutputIterator replace_copy(InputIterator first, InputIterator last,
|
3997 |
|
|
OutputIterator result,
|
3998 |
|
|
const T& old_value, const T& new_value);
|
3999 |
|
|
T template
|
4000 |
|
|
OutputIterator replace_copy_if(Iterator first, Iterator last,
|
4001 |
|
|
OutputIterator result,
|
4002 |
|
|
Predicate pred, const T& new_value);
|
4003 |
|
|
T template
|
4004 |
|
|
void fill(ForwardIterator first, ForwardIterator last, const T& value);
|
4005 |
|
|
T template
|
4006 |
|
|
void fill_n(OutputIterator first, Size n, const T& value);
|
4007 |
|
|
T template
|
4008 |
|
|
void generate(ForwardIterator first, ForwardIterator last, Generator gen);
|
4009 |
|
|
T template
|
4010 |
|
|
void generate_n(OutputIterator first, Size n, Generator gen);
|
4011 |
|
|
T template
|
4012 |
|
|
ForwardIterator remove(ForwardIterator first, ForwardIterator last,
|
4013 |
|
|
const T& value);
|
4014 |
|
|
T template
|
4015 |
|
|
ForwardIterator remove_if(ForwardIterator first, ForwardIterator last,
|
4016 |
|
|
Predicate pred);
|
4017 |
|
|
T template
|
4018 |
|
|
OutputIterator remove_copy(InputIterator first, InputIterator last,
|
4019 |
|
|
OutputIterator result, const T& value);
|
4020 |
|
|
T template
|
4021 |
|
|
OutputIterator remove_copy_if(InputIterator first, InputIterator last,
|
4022 |
|
|
OutputIterator result, Predicate pred);
|
4023 |
|
|
T template
|
4024 |
|
|
ForwardIterator unique(ForwardIterator first, ForwardIterator last);
|
4025 |
|
|
T template
|
4026 |
|
|
ForwardIterator unique(ForwardIterator first, ForwardIterator last,
|
4027 |
|
|
BinaryPredicate pred);
|
4028 |
|
|
T template
|
4029 |
|
|
OutputIterator unique_copy(InputIterator first, InputIterator last,
|
4030 |
|
|
OutputIterator result);
|
4031 |
|
|
T template
|
4032 |
|
|
OutputIterator unique_copy(InputIterator first, InputIterator last,
|
4033 |
|
|
OutputIterator result, BinaryPredicate pred);
|
4034 |
|
|
T template
|
4035 |
|
|
void reverse(BidirectionalIterator first, BidirectionalIterator last);
|
4036 |
|
|
T template
|
4037 |
|
|
OutputIterator reverse_copy(BidirectionalIterator first,
|
4038 |
|
|
BidirectionalIterator last,
|
4039 |
|
|
OutputIterator result);
|
4040 |
|
|
|
4041 |
|
|
T template
|
4042 |
|
|
void rotate(ForwardIterator first, ForwardIterator middle,
|
4043 |
|
|
ForwardIterator last);
|
4044 |
|
|
T template
|
4045 |
|
|
OutputIterator rotate_copy(ForwardIterator first, ForwardIterator middle,
|
4046 |
|
|
ForwardIterator last, OutputIterator result);
|
4047 |
|
|
T template
|
4048 |
|
|
void random_shuffle(RandomAccessIterator first,
|
4049 |
|
|
RandomAccessIterator last);
|
4050 |
|
|
T template
|
4051 |
|
|
void random_shuffle(RandomAccessIterator first,
|
4052 |
|
|
RandomAccessIterator last,
|
4053 |
|
|
RandomNumberGenerator& rand);
|
4054 |
|
|
// _lib.alg.partitions_, partitions:
|
4055 |
|
|
T template
|
4056 |
|
|
BidirectionalIterator partition(BidirectionalIterator first,
|
4057 |
|
|
BidirectionalIterator last,
|
4058 |
|
|
Predicate pred);
|
4059 |
|
|
T template
|
4060 |
|
|
BidirectionalIterator stable_partition(BidirectionalIterator first,
|
4061 |
|
|
BidirectionalIterator last,
|
4062 |
|
|
Predicate pred);
|
4063 |
|
|
// _lib.alg.sorting_, sorting and related operations:
|
4064 |
|
|
// _lib.alg.sort_, sorting:
|
4065 |
|
|
T template
|
4066 |
|
|
void sort(RandomAccessIterator first, RandomAccessIterator last);
|
4067 |
|
|
T template
|
4068 |
|
|
void sort(RandomAccessIterator first, RandomAccessIterator last,
|
4069 |
|
|
Compare comp);
|
4070 |
|
|
T template
|
4071 |
|
|
void stable_sort(RandomAccessIterator first, RandomAccessIterator last);
|
4072 |
|
|
T template
|
4073 |
|
|
void stable_sort(RandomAccessIterator first, RandomAccessIterator last,
|
4074 |
|
|
Compare comp);
|
4075 |
|
|
T template
|
4076 |
|
|
void partial_sort(RandomAccessIterator first,
|
4077 |
|
|
RandomAccessIterator middle,
|
4078 |
|
|
RandomAccessIterator last);
|
4079 |
|
|
T template
|
4080 |
|
|
void partial_sort(RandomAccessIterator first,
|
4081 |
|
|
RandomAccessIterator middle,
|
4082 |
|
|
RandomAccessIterator last, Compare comp);
|
4083 |
|
|
T template
|
4084 |
|
|
RandomAccessIterator
|
4085 |
|
|
partial_sort_copy(InputIterator first, InputIterator last,
|
4086 |
|
|
RandomAccessIterator result_first,
|
4087 |
|
|
RandomAccessIterator result_last);
|
4088 |
|
|
T template
|
4089 |
|
|
RandomAccessIterator
|
4090 |
|
|
partial_sort_copy(InputIterator first, InputIterator last,
|
4091 |
|
|
RandomAccessIterator result_first,
|
4092 |
|
|
RandomAccessIterator result_last,
|
4093 |
|
|
Compare comp);
|
4094 |
|
|
|
4095 |
|
|
T template
|
4096 |
|
|
void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
|
4097 |
|
|
RandomAccessIterator last);
|
4098 |
|
|
T template
|
4099 |
|
|
void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
|
4100 |
|
|
RandomAccessIterator last, Compare comp);
|
4101 |
|
|
// _lib.alg.binary.search_, binary search:
|
4102 |
|
|
T template
|
4103 |
|
|
ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
|
4104 |
|
|
const T& value);
|
4105 |
|
|
T template
|
4106 |
|
|
ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
|
4107 |
|
|
const T& value, Compare comp);
|
4108 |
|
|
T template
|
4109 |
|
|
ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
|
4110 |
|
|
const T& value);
|
4111 |
|
|
T template
|
4112 |
|
|
ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
|
4113 |
|
|
const T& value, Compare comp);
|
4114 |
|
|
T template
|
4115 |
|
|
pair
|
4116 |
|
|
equal_range(ForwardIterator first, ForwardIterator last,
|
4117 |
|
|
const T& value);
|
4118 |
|
|
T template
|
4119 |
|
|
pair
|
4120 |
|
|
equal_range(ForwardIterator first, ForwardIterator last,
|
4121 |
|
|
const T& value, Compare comp);
|
4122 |
|
|
T template
|
4123 |
|
|
bool binary_search(ForwardIterator first, ForwardIterator last,
|
4124 |
|
|
const T& value);
|
4125 |
|
|
T template
|
4126 |
|
|
bool binary_search(ForwardIterator first, ForwardIterator last,
|
4127 |
|
|
const T& value, Compare comp);
|
4128 |
|
|
// _lib.alg.merge_, merge:
|
4129 |
|
|
T template
|
4130 |
|
|
OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
|
4131 |
|
|
InputIterator2 first2, InputIterator2 last2,
|
4132 |
|
|
OutputIterator result);
|
4133 |
|
|
T template
|
4134 |
|
|
class Compare>
|
4135 |
|
|
OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
|
4136 |
|
|
InputIterator2 first2, InputIterator2 last2,
|
4137 |
|
|
OutputIterator result, Compare comp);
|
4138 |
|
|
T template
|
4139 |
|
|
void inplace_merge(BidirectionalIterator first,
|
4140 |
|
|
BidirectionalIterator middle,
|
4141 |
|
|
BidirectionalIterator last);
|
4142 |
|
|
T template
|
4143 |
|
|
void inplace_merge(BidirectionalIterator first,
|
4144 |
|
|
BidirectionalIterator middle,
|
4145 |
|
|
BidirectionalIterator last, Compare comp);
|
4146 |
|
|
|
4147 |
|
|
// _lib.alg.set.operations_, set operations:
|
4148 |
|
|
T template
|
4149 |
|
|
bool includes(InputIterator1 first1, InputIterator1 last1,
|
4150 |
|
|
InputIterator2 first2, InputIterator2 last2);
|
4151 |
|
|
T template
|
4152 |
|
|
bool includes(InputIterator1 first1, InputIterator1 last1,
|
4153 |
|
|
InputIterator2 first2, InputIterator2 last2, Compare comp);
|
4154 |
|
|
T template
|
4155 |
|
|
OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
|
4156 |
|
|
InputIterator2 first2, InputIterator2 last2,
|
4157 |
|
|
OutputIterator result);
|
4158 |
|
|
T template
|
4159 |
|
|
class Compare>
|
4160 |
|
|
OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
|
4161 |
|
|
InputIterator2 first2, InputIterator2 last2,
|
4162 |
|
|
OutputIterator result, Compare comp);
|
4163 |
|
|
T template
|
4164 |
|
|
OutputIterator set_intersection
|
4165 |
|
|
(InputIterator1 first1, InputIterator1 last1,
|
4166 |
|
|
InputIterator2 first2, InputIterator2 last2,
|
4167 |
|
|
OutputIterator result);
|
4168 |
|
|
T template
|
4169 |
|
|
class Compare>
|
4170 |
|
|
OutputIterator set_intersection
|
4171 |
|
|
(InputIterator1 first1, InputIterator1 last1,
|
4172 |
|
|
InputIterator2 first2, InputIterator2 last2,
|
4173 |
|
|
OutputIterator result, Compare comp);
|
4174 |
|
|
T template
|
4175 |
|
|
OutputIterator set_difference
|
4176 |
|
|
(InputIterator1 first1, InputIterator1 last1,
|
4177 |
|
|
InputIterator2 first2, InputIterator2 last2,
|
4178 |
|
|
OutputIterator result);
|
4179 |
|
|
T template
|
4180 |
|
|
class Compare>
|
4181 |
|
|
OutputIterator set_difference(InputIterator1 first1, InputIterator1 last1,
|
4182 |
|
|
InputIterator2 first2, InputIterator2 last2,
|
4183 |
|
|
OutputIterator result, Compare comp);
|
4184 |
|
|
T template
|
4185 |
|
|
OutputIterator
|
4186 |
|
|
set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
|
4187 |
|
|
InputIterator2 first2, InputIterator2 last2,
|
4188 |
|
|
OutputIterator result);
|
4189 |
|
|
T template
|
4190 |
|
|
class Compare>
|
4191 |
|
|
OutputIterator
|
4192 |
|
|
set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
|
4193 |
|
|
InputIterator2 first2, InputIterator2 last2,
|
4194 |
|
|
OutputIterator result, Compare comp);
|
4195 |
|
|
// _lib.alg.heap.operations_, heap operations:
|
4196 |
|
|
T template
|
4197 |
|
|
void push_heap(RandomAccessIterator first, RandomAccessIterator last);
|
4198 |
|
|
T template
|
4199 |
|
|
void push_heap(RandomAccessIterator first, RandomAccessIterator last,
|
4200 |
|
|
Compare comp);
|
4201 |
|
|
|
4202 |
|
|
T template
|
4203 |
|
|
void pop_heap(RandomAccessIterator first, RandomAccessIterator last);
|
4204 |
|
|
T template
|
4205 |
|
|
void pop_heap(RandomAccessIterator first, RandomAccessIterator last,
|
4206 |
|
|
Compare comp);
|
4207 |
|
|
T template
|
4208 |
|
|
void make_heap(RandomAccessIterator first, RandomAccessIterator last);
|
4209 |
|
|
T template
|
4210 |
|
|
void make_heap(RandomAccessIterator first, RandomAccessIterator last,
|
4211 |
|
|
Compare comp);
|
4212 |
|
|
T template
|
4213 |
|
|
void sort_heap(RandomAccessIterator first, RandomAccessIterator last);
|
4214 |
|
|
T template
|
4215 |
|
|
void sort_heap(RandomAccessIterator first, RandomAccessIterator last,
|
4216 |
|
|
Compare comp);
|
4217 |
|
|
// _lib.alg.min.max_, minimum and maximum:
|
4218 |
|
|
T template const T& min(const T& a, const T& b);
|
4219 |
|
|
T template
|
4220 |
|
|
const T& min(const T& a, const T& b, Compare comp);
|
4221 |
|
|
T template const T& max(const T& a, const T& b);
|
4222 |
|
|
T template
|
4223 |
|
|
const T& max(const T& a, const T& b, Compare comp);
|
4224 |
|
|
T template
|
4225 |
|
|
ForwardIterator min_element(ForwardIterator first, ForwardIterator last);
|
4226 |
|
|
T template
|
4227 |
|
|
ForwardIterator min_element(ForwardIterator first, ForwardIterator last,
|
4228 |
|
|
Compare comp);
|
4229 |
|
|
T template
|
4230 |
|
|
ForwardIterator max_element(ForwardIterator first, ForwardIterator last);
|
4231 |
|
|
T template
|
4232 |
|
|
ForwardIterator max_element(ForwardIterator first, ForwardIterator last,
|
4233 |
|
|
Compare comp);
|
4234 |
|
|
T template
|
4235 |
|
|
bool lexicographical_compare
|
4236 |
|
|
(InputIterator1 first1, InputIterator1 last1,
|
4237 |
|
|
InputIterator2 first2, InputIterator2 last2);
|
4238 |
|
|
T template
|
4239 |
|
|
bool lexicographical_compare
|
4240 |
|
|
(InputIterator1 first1, InputIterator1 last1,
|
4241 |
|
|
InputIterator2 first2, InputIterator2 last2,
|
4242 |
|
|
Compare comp);
|
4243 |
|
|
|
4244 |
|
|
// _lib.alg.permutation.generators_, permutations
|
4245 |
|
|
T template
|
4246 |
|
|
bool next_permutation(BidirectionalIterator first,
|
4247 |
|
|
BidirectionalIterator last);
|
4248 |
|
|
T template
|
4249 |
|
|
bool next_permutation(BidirectionalIterator first,
|
4250 |
|
|
BidirectionalIterator last, Compare comp);
|
4251 |
|
|
T template
|
4252 |
|
|
bool prev_permutation(BidirectionalIterator first,
|
4253 |
|
|
BidirectionalIterator last);
|
4254 |
|
|
T template
|
4255 |
|
|
bool prev_permutation(BidirectionalIterator first,
|
4256 |
|
|
BidirectionalIterator last, Compare comp);
|
4257 |
|
|
|
4258 |
|
|
|
4259 |
|
|
25.4 C library algorithms [lib.alg.c.library]
|
4260 |
|
|
|
4261 |
|
|
1 Header (partial, Table 2):
|
4262 |
|
|
|
4263 |
|
|
Table 2--Header synopsis
|
4264 |
|
|
|
4265 |
|
|
Functions: bsearch qsort
|
4266 |
|
|
|
4267 |
|
|
|
4268 |
|
|
X extern "C" void *bsearch(const void *key, const void *base,
|
4269 |
|
|
size_t nmemb, size_t size,
|
4270 |
|
|
int (*compar)(const void *, const void *));
|
4271 |
|
|
X extern "C++" void *bsearch(const void *key, const void *base,
|
4272 |
|
|
size_t nmemb, size_t size,
|
4273 |
|
|
int (*compar)(const void *, const void *));
|
4274 |
|
|
|
4275 |
|
|
X extern "C" void qsort(void* base, size_t nmemb, size_t size,
|
4276 |
|
|
int (*compar)(const void*, const void*));
|
4277 |
|
|
X extern "C++" void qsort(void* base, size_t nmemb, size_t size,
|
4278 |
|
|
int (*compar)(const void*, const void*));
|
4279 |
|
|
|
4280 |
|
|
|
4281 |
|
|
|
4282 |
|
|
26.2 Complex numbers [lib.complex.numbers]
|
4283 |
|
|
|
4284 |
|
|
|
4285 |
|
|
26.2.1 Header synopsis [lib.complex.synopsis]
|
4286 |
|
|
|
4287 |
|
|
T template class complex;
|
4288 |
|
|
T template<> class complex;
|
4289 |
|
|
T template<> class complex;
|
4290 |
|
|
T template<> class complex;
|
4291 |
|
|
// _lib.complex.ops_ operators:
|
4292 |
|
|
T template
|
4293 |
|
|
complex operator+(const complex&, const complex&);
|
4294 |
|
|
T template complex operator+(const complex&, const T&);
|
4295 |
|
|
T template complex operator+(const T&, const complex&);
|
4296 |
|
|
T template complex operator-
|
4297 |
|
|
(const complex&, const complex&);
|
4298 |
|
|
T template complex operator-(const complex&, const T&);
|
4299 |
|
|
T template complex operator-(const T&, const complex&);
|
4300 |
|
|
T template complex operator*
|
4301 |
|
|
(const complex&, const complex&);
|
4302 |
|
|
T template complex operator*(const complex&, const T&);
|
4303 |
|
|
T template complex operator*(const T&, const complex&);
|
4304 |
|
|
T template complex operator/
|
4305 |
|
|
(const complex&, const complex&);
|
4306 |
|
|
T template complex operator/(const complex&, const T&);
|
4307 |
|
|
T template complex operator/(const T&, const complex&);
|
4308 |
|
|
T template complex operator+(const complex&);
|
4309 |
|
|
T template complex operator-(const complex&);
|
4310 |
|
|
T template bool operator==
|
4311 |
|
|
(const complex&, const complex&);
|
4312 |
|
|
T template bool operator==(const complex&, const T&);
|
4313 |
|
|
T template bool operator==(const T&, const complex&);
|
4314 |
|
|
T template bool operator!=(const complex&, const complex&);
|
4315 |
|
|
T template bool operator!=(const complex&, const T&);
|
4316 |
|
|
T template bool operator!=(const T&, const complex&);
|
4317 |
|
|
T template
|
4318 |
|
|
basic_istream&
|
4319 |
|
|
operator>>(basic_istream&, complex&);
|
4320 |
|
|
|
4321 |
|
|
T template
|
4322 |
|
|
basic_ostream&
|
4323 |
|
|
operator<<(basic_ostream&, const complex&);
|
4324 |
|
|
// _lib.complex.value.ops_ values:
|
4325 |
|
|
T template T real(const complex&);
|
4326 |
|
|
T template T imag(const complex&);
|
4327 |
|
|
|
4328 |
|
|
T template T abs(const complex&);
|
4329 |
|
|
T template T arg(const complex&);
|
4330 |
|
|
T template T norm(const complex&);
|
4331 |
|
|
T template complex conj(const complex&);
|
4332 |
|
|
T template complex polar(const T&, const T&);
|
4333 |
|
|
// _lib.complex.transcendentals_ transcendentals:
|
4334 |
|
|
T template complex cos (const complex&);
|
4335 |
|
|
T template complex cosh (const complex&);
|
4336 |
|
|
T template complex exp (const complex&);
|
4337 |
|
|
T template complex log (const complex&);
|
4338 |
|
|
T template complex log10(const complex&);
|
4339 |
|
|
T template complex pow(const complex&, int);
|
4340 |
|
|
T template complex pow(const complex&, const T&);
|
4341 |
|
|
T template complex pow(const complex&, const complex&);
|
4342 |
|
|
T template complex pow(const T&, const complex&);
|
4343 |
|
|
T template complex sin (const complex&);
|
4344 |
|
|
T template complex sinh (const complex&);
|
4345 |
|
|
T template complex sqrt (const complex&);
|
4346 |
|
|
T template complex tan (const complex&);
|
4347 |
|
|
T template complex tanh (const complex&);
|
4348 |
|
|
}
|
4349 |
|
|
|
4350 |
|
|
26.2.2 Template class complex [lib.complex]
|
4351 |
|
|
|
4352 |
|
|
template
|
4353 |
|
|
T class complex {
|
4354 |
|
|
public:
|
4355 |
|
|
T typedef T value_type;
|
4356 |
|
|
|
4357 |
|
|
T complex(const T& re = T(), const T& im = T());
|
4358 |
|
|
T complex(const complex&);
|
4359 |
|
|
T template complex(const complex&);
|
4360 |
|
|
|
4361 |
|
|
T T real() const;
|
4362 |
|
|
T T imag() const;
|
4363 |
|
|
|
4364 |
|
|
T complex& operator= (const T&);
|
4365 |
|
|
T complex& operator+=(const T&);
|
4366 |
|
|
T complex& operator-=(const T&);
|
4367 |
|
|
T complex& operator*=(const T&);
|
4368 |
|
|
T complex& operator/=(const T&);
|
4369 |
|
|
|
4370 |
|
|
T complex& operator=(const complex&);
|
4371 |
|
|
T template complex& operator= (const complex&);
|
4372 |
|
|
T template complex& operator+=(const complex&);
|
4373 |
|
|
T template complex& operator-=(const complex&);
|
4374 |
|
|
T template complex& operator*=(const complex&);
|
4375 |
|
|
T template complex& operator/=(const complex&);
|
4376 |
|
|
};
|
4377 |
|
|
|
4378 |
|
|
T template complex operator+
|
4379 |
|
|
(const complex&, const complex&);
|
4380 |
|
|
T template complex operator+(const complex&, const T&);
|
4381 |
|
|
T template complex operator+(const T&, const complex&);
|
4382 |
|
|
|
4383 |
|
|
T template complex operator-
|
4384 |
|
|
(const complex&, const complex&);
|
4385 |
|
|
T template complex operator-(const complex&, const T&);
|
4386 |
|
|
T template complex operator-(const T&, const complex&);
|
4387 |
|
|
|
4388 |
|
|
T template complex operator*
|
4389 |
|
|
(const complex&, const complex&);
|
4390 |
|
|
T template complex operator*(const complex&, const T&);
|
4391 |
|
|
T template complex operator*(const T&, const complex&);
|
4392 |
|
|
|
4393 |
|
|
T template complex operator/
|
4394 |
|
|
(const complex&, const complex&);
|
4395 |
|
|
T template complex operator/(const complex&, const T&);
|
4396 |
|
|
T template complex operator/(const T&, const complex&);
|
4397 |
|
|
|
4398 |
|
|
T template complex operator+(const complex&);
|
4399 |
|
|
T template complex operator-(const complex&);
|
4400 |
|
|
|
4401 |
|
|
T template bool operator==(const complex&, const complex&);
|
4402 |
|
|
T template bool operator==(const complex&, const T&);
|
4403 |
|
|
T template bool operator==(const T&, const complex&);
|
4404 |
|
|
|
4405 |
|
|
T template bool operator!=(const complex&, const complex&);
|
4406 |
|
|
T template bool operator!=(const complex&, const T&);
|
4407 |
|
|
T template bool operator!=(const T&, const complex&);
|
4408 |
|
|
|
4409 |
|
|
T template
|
4410 |
|
|
basic_istream&
|
4411 |
|
|
operator>>(basic_istream&, complex&);
|
4412 |
|
|
|
4413 |
|
|
T template
|
4414 |
|
|
basic_ostream&
|
4415 |
|
|
operator<<(basic_ostream&, const complex&);
|
4416 |
|
|
|
4417 |
|
|
|
4418 |
|
|
26.2.3 complex specializations [lib.complex.special]
|
4419 |
|
|
|
4420 |
|
|
T template<> class complex {
|
4421 |
|
|
public:
|
4422 |
|
|
T typedef float value_type;
|
4423 |
|
|
|
4424 |
|
|
T complex(float re = 0.0f, float im = 0.0f);
|
4425 |
|
|
T explicit complex(const complex&);
|
4426 |
|
|
T explicit complex(const complex&);
|
4427 |
|
|
T float real() const;
|
4428 |
|
|
T float imag() const;
|
4429 |
|
|
|
4430 |
|
|
T complex& operator= (float);
|
4431 |
|
|
T complex& operator+=(float);
|
4432 |
|
|
T complex& operator-=(float);
|
4433 |
|
|
T complex& operator*=(float);
|
4434 |
|
|
T complex& operator/=(float);
|
4435 |
|
|
|
4436 |
|
|
T complex& operator=(const complex&);
|
4437 |
|
|
T template complex& operator= (const complex&);
|
4438 |
|
|
T template complex& operator+=(const complex&);
|
4439 |
|
|
T template complex& operator-=(const complex&);
|
4440 |
|
|
T template complex& operator*=(const complex&);
|
4441 |
|
|
T template complex& operator/=(const complex&);
|
4442 |
|
|
};
|
4443 |
|
|
T template<> class complex {
|
4444 |
|
|
public:
|
4445 |
|
|
T typedef double value_type;
|
4446 |
|
|
|
4447 |
|
|
T complex(double re = 0.0, double im = 0.0);
|
4448 |
|
|
T complex(const complex&);
|
4449 |
|
|
T explicit complex(const complex&);
|
4450 |
|
|
T double real() const;
|
4451 |
|
|
T double imag() const;
|
4452 |
|
|
|
4453 |
|
|
T complex& operator= (double);
|
4454 |
|
|
T complex& operator+=(double);
|
4455 |
|
|
T complex& operator-=(double);
|
4456 |
|
|
T complex& operator*=(double);
|
4457 |
|
|
T complex& operator/=(double);
|
4458 |
|
|
|
4459 |
|
|
T complex& operator=(const complex&);
|
4460 |
|
|
T template complex& operator= (const complex&);
|
4461 |
|
|
T template complex& operator+=(const complex&);
|
4462 |
|
|
T template complex& operator-=(const complex&);
|
4463 |
|
|
T template complex& operator*=(const complex&);
|
4464 |
|
|
T template complex& operator/=(const complex&);
|
4465 |
|
|
};
|
4466 |
|
|
|
4467 |
|
|
T template<> class complex {
|
4468 |
|
|
public:
|
4469 |
|
|
T typedef long double value_type;
|
4470 |
|
|
|
4471 |
|
|
T complex(long double re = 0.0L, long double im = 0.0L);
|
4472 |
|
|
T complex(const complex&);
|
4473 |
|
|
T complex(const complex&);
|
4474 |
|
|
T long double real() const;
|
4475 |
|
|
T long double imag() const;
|
4476 |
|
|
|
4477 |
|
|
T complex& operator=(const complex&);
|
4478 |
|
|
T complex& operator= (long double);
|
4479 |
|
|
T complex& operator+=(long double);
|
4480 |
|
|
T complex& operator-=(long double);
|
4481 |
|
|
T complex& operator*=(long double);
|
4482 |
|
|
T complex& operator/=(long double);
|
4483 |
|
|
|
4484 |
|
|
T template complex& operator= (const complex&);
|
4485 |
|
|
T template complex& operator+=(const complex&);
|
4486 |
|
|
T template complex& operator-=(const complex&);
|
4487 |
|
|
T template complex& operator*=(const complex&);
|
4488 |
|
|
T template complex& operator/=(const complex&);
|
4489 |
|
|
};
|
4490 |
|
|
|
4491 |
|
|
26.3 Numeric arrays [lib.numarray]
|
4492 |
|
|
|
4493 |
|
|
26.3.1 Header synopsis [lib.valarray.synopsis]
|
4494 |
|
|
|
4495 |
|
|
T template class valarray; // An array of type T
|
4496 |
|
|
T class slice;
|
4497 |
|
|
T template class slice_array;
|
4498 |
|
|
T class gslice;
|
4499 |
|
|
T template class gslice_array;
|
4500 |
|
|
T template class mask_array; // a masked array
|
4501 |
|
|
T template class indirect_array; // an indirected array
|
4502 |
|
|
|
4503 |
|
|
T template valarray operator*
|
4504 |
|
|
(const valarray&, const valarray&);
|
4505 |
|
|
T template valarray operator* (const valarray&, const T&);
|
4506 |
|
|
T template valarray operator* (const T&, const valarray&);
|
4507 |
|
|
T template valarray operator/
|
4508 |
|
|
(const valarray&, const valarray&);
|
4509 |
|
|
T template valarray operator/ (const valarray&, const T&);
|
4510 |
|
|
T template valarray operator/ (const T&, const valarray&);
|
4511 |
|
|
T template valarray operator%
|
4512 |
|
|
(const valarray&, const valarray&);
|
4513 |
|
|
T template valarray operator% (const valarray&, const T&);
|
4514 |
|
|
T template valarray operator% (const T&, const valarray&);
|
4515 |
|
|
T template valarray operator+
|
4516 |
|
|
(const valarray&, const valarray&);
|
4517 |
|
|
T template valarray operator+ (const valarray&, const T&);
|
4518 |
|
|
T template valarray operator+ (const T&, const valarray&);
|
4519 |
|
|
T template valarray operator-
|
4520 |
|
|
(const valarray&, const valarray&);
|
4521 |
|
|
T template valarray operator- (const valarray&, const T&);
|
4522 |
|
|
T template valarray operator- (const T&, const valarray&);
|
4523 |
|
|
T template valarray operator^
|
4524 |
|
|
(const valarray&, const valarray&);
|
4525 |
|
|
T template valarray operator^ (const valarray&, const T&);
|
4526 |
|
|
T template valarray operator^ (const T&, const valarray&);
|
4527 |
|
|
T template valarray operator&
|
4528 |
|
|
(const valarray&, const valarray&);
|
4529 |
|
|
T template valarray operator& (const valarray&, const T&);
|
4530 |
|
|
T template valarray operator& (const T&, const valarray&);
|
4531 |
|
|
T template valarray operator|
|
4532 |
|
|
(const valarray&, const valarray&);
|
4533 |
|
|
T template valarray operator| (const valarray&, const T&);
|
4534 |
|
|
T template valarray operator| (const T&, const valarray&);
|
4535 |
|
|
T template valarray operator<<
|
4536 |
|
|
(const valarray&, const valarray&);
|
4537 |
|
|
T template valarray operator<<(const valarray&, const T&);
|
4538 |
|
|
T template valarray operator<<(const T&, const valarray&);
|
4539 |
|
|
T template valarray operator>>
|
4540 |
|
|
(const valarray&, const valarray&);
|
4541 |
|
|
T template valarray operator>>(const valarray&, const T&);
|
4542 |
|
|
T template valarray operator>>(const T&, const valarray&);
|
4543 |
|
|
T template valarray operator&&
|
4544 |
|
|
(const valarray&, const valarray&);
|
4545 |
|
|
T template valarray operator&&(const valarray&, const T&);
|
4546 |
|
|
T template valarray operator&&(const T&, const valarray&);
|
4547 |
|
|
T template valarray operator||
|
4548 |
|
|
(const valarray&, const valarray&);
|
4549 |
|
|
T template valarray operator||(const valarray&, const T&);
|
4550 |
|
|
T template valarray operator||(const T&, const valarray&);
|
4551 |
|
|
|
4552 |
|
|
T template
|
4553 |
|
|
valarray operator==(const valarray&, const valarray&);
|
4554 |
|
|
T template valarray operator==(const valarray&, const T&);
|
4555 |
|
|
T template valarray operator==(const T&, const valarray&);
|
4556 |
|
|
T template
|
4557 |
|
|
valarray operator!=(const valarray&, const valarray&);
|
4558 |
|
|
T template valarray operator!=(const valarray&, const T&);
|
4559 |
|
|
T template valarray operator!=(const T&, const valarray&);
|
4560 |
|
|
T template
|
4561 |
|
|
valarray operator< (const valarray&, const valarray&);
|
4562 |
|
|
T template valarray operator< (const valarray&, const T&);
|
4563 |
|
|
T template valarray operator< (const T&, const valarray&);
|
4564 |
|
|
T template
|
4565 |
|
|
valarray operator> (const valarray&, const valarray&);
|
4566 |
|
|
T template valarray operator> (const valarray&, const T&);
|
4567 |
|
|
T template valarray operator> (const T&, const valarray&);
|
4568 |
|
|
T template
|
4569 |
|
|
valarray operator<=(const valarray&, const valarray&);
|
4570 |
|
|
T template valarray operator<=(const valarray&, const T&);
|
4571 |
|
|
T template valarray operator<=(const T&, const valarray&);
|
4572 |
|
|
T template
|
4573 |
|
|
valarray operator>=(const valarray&, const valarray&);
|
4574 |
|
|
T template valarray operator>=(const valarray&, const T&);
|
4575 |
|
|
T template valarray operator>=(const T&, const valarray&);
|
4576 |
|
|
T template valarray abs (const valarray&);
|
4577 |
|
|
T template valarray acos (const valarray&);
|
4578 |
|
|
T template valarray asin (const valarray&);
|
4579 |
|
|
T template valarray atan (const valarray&);
|
4580 |
|
|
T template valarray atan2
|
4581 |
|
|
(const valarray&, const valarray&);
|
4582 |
|
|
T template valarray atan2(const valarray&, const T&);
|
4583 |
|
|
T template valarray atan2(const T&, const valarray&);
|
4584 |
|
|
T template valarray cos (const valarray&);
|
4585 |
|
|
T template valarray cosh (const valarray&);
|
4586 |
|
|
T template valarray exp (const valarray&);
|
4587 |
|
|
T template valarray log (const valarray&);
|
4588 |
|
|
T template valarray log10(const valarray&);
|
4589 |
|
|
T template valarray pow(const valarray&, const valarray&);
|
4590 |
|
|
T template valarray pow(const valarray&, const T&);
|
4591 |
|
|
T template valarray pow(const T&, const valarray&);
|
4592 |
|
|
T template valarray sin (const valarray&);
|
4593 |
|
|
T template valarray sinh (const valarray&);
|
4594 |
|
|
T template valarray sqrt (const valarray&);
|
4595 |
|
|
T template valarray tan (const valarray&);
|
4596 |
|
|
T template valarray tanh (const valarray&);
|
4597 |
|
|
}
|
4598 |
|
|
|
4599 |
|
|
|
4600 |
|
|
26.3.2 Template class valarray [lib.template.valarray]
|
4601 |
|
|
|
4602 |
|
|
T template class valarray {
|
4603 |
|
|
public:
|
4604 |
|
|
T typedef T value_type;
|
4605 |
|
|
|
4606 |
|
|
// _lib.valarray.cons_ construct/destroy:
|
4607 |
|
|
T valarray();
|
4608 |
|
|
T explicit valarray(size_t);
|
4609 |
|
|
T valarray(const T&, size_t);
|
4610 |
|
|
T valarray(const T*, size_t);
|
4611 |
|
|
T valarray(const valarray&);
|
4612 |
|
|
T valarray(const slice_array&);
|
4613 |
|
|
T valarray(const gslice_array&);
|
4614 |
|
|
T valarray(const mask_array&);
|
4615 |
|
|
T valarray(const indirect_array&);
|
4616 |
|
|
T ~valarray();
|
4617 |
|
|
|
4618 |
|
|
// _lib.valarray.assign_ assignment:
|
4619 |
|
|
T valarray& operator=(const valarray&);
|
4620 |
|
|
T valarray& operator=(const T&);
|
4621 |
|
|
T valarray& operator=(const slice_array&);
|
4622 |
|
|
T valarray& operator=(const gslice_array&);
|
4623 |
|
|
T valarray& operator=(const mask_array&);
|
4624 |
|
|
T valarray& operator=(const indirect_array&);
|
4625 |
|
|
// _lib.valarray.access_ element access:
|
4626 |
|
|
T T operator[](size_t) const;
|
4627 |
|
|
T T& operator[](size_t);
|
4628 |
|
|
// _lib.valarray.sub_ subset operations:
|
4629 |
|
|
T valarray operator[](slice) const;
|
4630 |
|
|
T slice_array operator[](slice);
|
4631 |
|
|
T valarray operator[](const gslice&) const;
|
4632 |
|
|
T gslice_array operator[](const gslice&);
|
4633 |
|
|
T valarray operator[](const valarray&) const;
|
4634 |
|
|
T mask_array operator[](const valarray&);
|
4635 |
|
|
T valarray operator[](const valarray&) const;
|
4636 |
|
|
T indirect_array operator[](const valarray&);
|
4637 |
|
|
// _lib.valarray.unary_ unary operators:
|
4638 |
|
|
T valarray operator+() const;
|
4639 |
|
|
T valarray operator-() const;
|
4640 |
|
|
T valarray operator~() const;
|
4641 |
|
|
T valarray operator!() const;
|
4642 |
|
|
// _lib.valarray.cassign_ computed assignment:
|
4643 |
|
|
T valarray& operator*= (const T&);
|
4644 |
|
|
T valarray& operator/= (const T&);
|
4645 |
|
|
T valarray& operator%= (const T&);
|
4646 |
|
|
T valarray& operator+= (const T&);
|
4647 |
|
|
T valarray& operator-= (const T&);
|
4648 |
|
|
T valarray& operator^= (const T&);
|
4649 |
|
|
T valarray& operator&= (const T&);
|
4650 |
|
|
T valarray& operator|= (const T&);
|
4651 |
|
|
T valarray& operator<<=(const T&);
|
4652 |
|
|
T valarray& operator>>=(const T&);
|
4653 |
|
|
T valarray& operator*= (const valarray&);
|
4654 |
|
|
T valarray& operator/= (const valarray&);
|
4655 |
|
|
T valarray& operator%= (const valarray&);
|
4656 |
|
|
T valarray& operator+= (const valarray&);
|
4657 |
|
|
T valarray& operator-= (const valarray&);
|
4658 |
|
|
T valarray& operator^= (const valarray&);
|
4659 |
|
|
T valarray& operator|= (const valarray&);
|
4660 |
|
|
T valarray& operator&= (const valarray&);
|
4661 |
|
|
T valarray& operator<<=(const valarray&);
|
4662 |
|
|
T valarray& operator>>=(const valarray&);
|
4663 |
|
|
// _lib.valarray.members_ member functions:
|
4664 |
|
|
T size_t size() const;
|
4665 |
|
|
T T sum() const;
|
4666 |
|
|
T T min() const;
|
4667 |
|
|
T T max() const;
|
4668 |
|
|
|
4669 |
|
|
T valarray shift (int) const;
|
4670 |
|
|
T valarray cshift(int) const;
|
4671 |
|
|
T valarray apply(T func(T)) const;
|
4672 |
|
|
T valarray apply(T func(const T&)) const;
|
4673 |
|
|
T void resize(size_t sz, T c = T());
|
4674 |
|
|
};
|
4675 |
|
|
}
|
4676 |
|
|
|
4677 |
|
|
|
4678 |
|
|
|
4679 |
|
|
26.3.4 Class slice [lib.class.slice]
|
4680 |
|
|
|
4681 |
|
|
T class slice {
|
4682 |
|
|
public:
|
4683 |
|
|
T slice();
|
4684 |
|
|
T slice(size_t, size_t, size_t);
|
4685 |
|
|
|
4686 |
|
|
T size_t start() const;
|
4687 |
|
|
T size_t size() const;
|
4688 |
|
|
T size_t stride() const;
|
4689 |
|
|
};
|
4690 |
|
|
}
|
4691 |
|
|
|
4692 |
|
|
|
4693 |
|
|
|
4694 |
|
|
26.3.5 Template class slice_array [lib.template.slice.array]
|
4695 |
|
|
|
4696 |
|
|
T template class slice_array {
|
4697 |
|
|
public:
|
4698 |
|
|
T typedef T value_type;
|
4699 |
|
|
|
4700 |
|
|
T void operator= (const valarray&) const;
|
4701 |
|
|
T void operator*= (const valarray&) const;
|
4702 |
|
|
T void operator/= (const valarray&) const;
|
4703 |
|
|
T void operator%= (const valarray&) const;
|
4704 |
|
|
T void operator+= (const valarray&) const;
|
4705 |
|
|
T void operator-= (const valarray&) const;
|
4706 |
|
|
T void operator^= (const valarray&) const;
|
4707 |
|
|
T void operator&= (const valarray&) const;
|
4708 |
|
|
T void operator|= (const valarray&) const;
|
4709 |
|
|
T void operator<<=(const valarray&) const;
|
4710 |
|
|
T void operator>>=(const valarray&) const;
|
4711 |
|
|
T void operator=(const T&);
|
4712 |
|
|
T ~slice_array();
|
4713 |
|
|
private:
|
4714 |
|
|
T slice_array();
|
4715 |
|
|
T slice_array(const slice_array&);
|
4716 |
|
|
T slice_array& operator=(const slice_array&);
|
4717 |
|
|
};
|
4718 |
|
|
}
|
4719 |
|
|
|
4720 |
|
|
|
4721 |
|
|
|
4722 |
|
|
26.3.6 The gslice class [lib.class.gslice]
|
4723 |
|
|
|
4724 |
|
|
T class gslice {
|
4725 |
|
|
public:
|
4726 |
|
|
T gslice();
|
4727 |
|
|
T gslice(size_t s, const valarray& l, const valarray& d);
|
4728 |
|
|
|
4729 |
|
|
T size_t start() const;
|
4730 |
|
|
T valarray size() const;
|
4731 |
|
|
T valarray stride() const;
|
4732 |
|
|
};
|
4733 |
|
|
|
4734 |
|
|
|
4735 |
|
|
26.3.7 Template class gslice_array [lib.template.gslice.array]
|
4736 |
|
|
|
4737 |
|
|
T template class gslice_array {
|
4738 |
|
|
public:
|
4739 |
|
|
T typedef T value_type;
|
4740 |
|
|
|
4741 |
|
|
T void operator= (const valarray&) const;
|
4742 |
|
|
T void operator*= (const valarray&) const;
|
4743 |
|
|
T void operator/= (const valarray&) const;
|
4744 |
|
|
T void operator%= (const valarray&) const;
|
4745 |
|
|
T void operator+= (const valarray&) const;
|
4746 |
|
|
T void operator-= (const valarray&) const;
|
4747 |
|
|
T void operator^= (const valarray&) const;
|
4748 |
|
|
T void operator&= (const valarray&) const;
|
4749 |
|
|
T void operator|= (const valarray&) const;
|
4750 |
|
|
T void operator<<=(const valarray&) const;
|
4751 |
|
|
T void operator>>=(const valarray&) const;
|
4752 |
|
|
T void operator=(const T&);
|
4753 |
|
|
T ~gslice_array();
|
4754 |
|
|
private:
|
4755 |
|
|
T gslice_array();
|
4756 |
|
|
T gslice_array(const gslice_array&);
|
4757 |
|
|
T gslice_array& operator=(const gslice_array&);
|
4758 |
|
|
};
|
4759 |
|
|
|
4760 |
|
|
|
4761 |
|
|
26.3.8 Template class mask_array [lib.template.mask.array]
|
4762 |
|
|
|
4763 |
|
|
T template class mask_array {
|
4764 |
|
|
public:
|
4765 |
|
|
T typedef T value_type;
|
4766 |
|
|
|
4767 |
|
|
T void operator= (const valarray&) const;
|
4768 |
|
|
T void operator*= (const valarray&) const;
|
4769 |
|
|
T void operator/= (const valarray&) const;
|
4770 |
|
|
T void operator%= (const valarray&) const;
|
4771 |
|
|
T void operator+= (const valarray&) const;
|
4772 |
|
|
T void operator-= (const valarray&) const;
|
4773 |
|
|
T void operator^= (const valarray&) const;
|
4774 |
|
|
T void operator&= (const valarray&) const;
|
4775 |
|
|
T void operator|= (const valarray&) const;
|
4776 |
|
|
T void operator<<=(const valarray&) const;
|
4777 |
|
|
T void operator>>=(const valarray&) const;
|
4778 |
|
|
T void operator=(const T&);
|
4779 |
|
|
T ~mask_array();
|
4780 |
|
|
private:
|
4781 |
|
|
T mask_array();
|
4782 |
|
|
T mask_array(const mask_array&);
|
4783 |
|
|
T mask_array& operator=(const mask_array&);
|
4784 |
|
|
// remainder implementation defined
|
4785 |
|
|
};
|
4786 |
|
|
|
4787 |
|
|
|
4788 |
|
|
26.3.9 Template class [lib.template.indirect.array]
|
4789 |
|
|
indirect_array
|
4790 |
|
|
|
4791 |
|
|
T template class indirect_array {
|
4792 |
|
|
public:
|
4793 |
|
|
T typedef T value_type;
|
4794 |
|
|
|
4795 |
|
|
T void operator= (const valarray&) const;
|
4796 |
|
|
T void operator*= (const valarray&) const;
|
4797 |
|
|
T void operator/= (const valarray&) const;
|
4798 |
|
|
T void operator%= (const valarray&) const;
|
4799 |
|
|
T void operator+= (const valarray&) const;
|
4800 |
|
|
T void operator-= (const valarray&) const;
|
4801 |
|
|
T void operator^= (const valarray&) const;
|
4802 |
|
|
T void operator&= (const valarray&) const;
|
4803 |
|
|
T void operator|= (const valarray&) const;
|
4804 |
|
|
T void operator<<=(const valarray&) const;
|
4805 |
|
|
T void operator>>=(const valarray&) const;
|
4806 |
|
|
T void operator=(const T&);
|
4807 |
|
|
T ~indirect_array();
|
4808 |
|
|
private:
|
4809 |
|
|
T indirect_array();
|
4810 |
|
|
T indirect_array(const indirect_array&);
|
4811 |
|
|
T indirect_array& operator=(const indirect_array&);
|
4812 |
|
|
// remainder implementation defined
|
4813 |
|
|
};
|
4814 |
|
|
|
4815 |
|
|
26.4 Generalized numeric operations [lib.numeric.ops]
|
4816 |
|
|
|
4817 |
|
|
Header synopsis
|
4818 |
|
|
|
4819 |
|
|
T template
|
4820 |
|
|
T accumulate(InputIterator first, InputIterator last, T init);
|
4821 |
|
|
|
4822 |
|
|
T template
|
4823 |
|
|
T accumulate(InputIterator first, InputIterator last, T init,
|
4824 |
|
|
BinaryOperation binary_op);
|
4825 |
|
|
|
4826 |
|
|
T template
|
4827 |
|
|
T inner_product(InputIterator1 first1, InputIterator1 last1,
|
4828 |
|
|
InputIterator2 first2, T init);
|
4829 |
|
|
|
4830 |
|
|
T template
|
4831 |
|
|
class BinaryOperation1, class BinaryOperation2>
|
4832 |
|
|
T inner_product(InputIterator1 first1, InputIterator1 last1,
|
4833 |
|
|
InputIterator2 first2, T init,
|
4834 |
|
|
BinaryOperation1 binary_op1,
|
4835 |
|
|
BinaryOperation2 binary_op2);
|
4836 |
|
|
|
4837 |
|
|
T template
|
4838 |
|
|
OutputIterator partial_sum(InputIterator first,
|
4839 |
|
|
InputIterator last,
|
4840 |
|
|
OutputIterator result);
|
4841 |
|
|
|
4842 |
|
|
T template
|
4843 |
|
|
class BinaryOperation>
|
4844 |
|
|
OutputIterator partial_sum(InputIterator first,
|
4845 |
|
|
InputIterator last,
|
4846 |
|
|
OutputIterator result,
|
4847 |
|
|
BinaryOperation binary_op);
|
4848 |
|
|
|
4849 |
|
|
T template
|
4850 |
|
|
OutputIterator adjacent_difference(InputIterator first,
|
4851 |
|
|
InputIterator last,
|
4852 |
|
|
OutputIterator result);
|
4853 |
|
|
|
4854 |
|
|
T template
|
4855 |
|
|
class BinaryOperation>
|
4856 |
|
|
OutputIterator adjacent_difference(InputIterator first,
|
4857 |
|
|
InputIterator last,
|
4858 |
|
|
OutputIterator result,
|
4859 |
|
|
BinaryOperation binary_op);
|
4860 |
|
|
|
4861 |
|
|
|
4862 |
|
|
26.5 C Library [lib.c.math]
|
4863 |
|
|
|
4864 |
|
|
Table 2--Header synopsis
|
4865 |
|
|
X Macro: HUGE_VAL
|
4866 |
|
|
Functions:
|
4867 |
|
|
X acos cos fmod modf tan
|
4868 |
|
|
X asin cosh frexp pow tanh
|
4869 |
|
|
X atan exp ldexp sin
|
4870 |
|
|
X atan2 fabs log sinh
|
4871 |
|
|
X ceil floor log10 sqrt
|
4872 |
|
|
|
4873 |
|
|
Table 3--Header synopsis
|
4874 |
|
|
X Macros: RAND_MAX
|
4875 |
|
|
X Types: div_t ldiv_t
|
4876 |
|
|
Functions:
|
4877 |
|
|
X abs labs srand
|
4878 |
|
|
X div ldiv rand
|
4879 |
|
|
|
4880 |
|
|
X long abs(long); // labs()
|
4881 |
|
|
X ldiv_t div(long, long); // ldiv()
|
4882 |
|
|
|
4883 |
|
|
X float abs (float);
|
4884 |
|
|
X float acos (float);
|
4885 |
|
|
X float asin (float);
|
4886 |
|
|
X float atan (float);
|
4887 |
|
|
X float atan2(float, float);
|
4888 |
|
|
X float ceil (float);
|
4889 |
|
|
X float cos (float);
|
4890 |
|
|
X float cosh (float);
|
4891 |
|
|
X float exp (float);
|
4892 |
|
|
X float fabs (float);
|
4893 |
|
|
X float floor(float);
|
4894 |
|
|
X float fmod (float, float);
|
4895 |
|
|
X float frexp(float, int*);
|
4896 |
|
|
X float ldexp(float, int);
|
4897 |
|
|
X float log (float);
|
4898 |
|
|
X float log10(float);
|
4899 |
|
|
X float modf (float, float*);
|
4900 |
|
|
X float pow (float, float);
|
4901 |
|
|
X float pow (float, int);
|
4902 |
|
|
X float sin (float);
|
4903 |
|
|
X float sinh (float);
|
4904 |
|
|
X float sqrt (float);
|
4905 |
|
|
X float tan (float);
|
4906 |
|
|
X float tanh (float);
|
4907 |
|
|
|
4908 |
|
|
X double abs(double); // fabs()
|
4909 |
|
|
X double pow(double, int);
|
4910 |
|
|
|
4911 |
|
|
X long double abs (long double);
|
4912 |
|
|
X long double acos (long double);
|
4913 |
|
|
X long double asin (long double);
|
4914 |
|
|
X long double atan (long double);
|
4915 |
|
|
X long double atan2(long double, long double);
|
4916 |
|
|
X long double ceil (long double);
|
4917 |
|
|
X long double cos (long double);
|
4918 |
|
|
X long double cosh (long double);
|
4919 |
|
|
X long double exp (long double);
|
4920 |
|
|
X long double fabs (long double);
|
4921 |
|
|
X long double floor(long double);
|
4922 |
|
|
X long double fmod (long double, long double);
|
4923 |
|
|
X long double frexp(long double, int*);
|
4924 |
|
|
X long double ldexp(long double, int);
|
4925 |
|
|
X long double log (long double);
|
4926 |
|
|
X long double log10(long double);
|
4927 |
|
|
X long double modf (long double, long double*);
|
4928 |
|
|
X long double pow (long double, long double);
|
4929 |
|
|
X long double pow (long double, int);
|
4930 |
|
|
X long double sin (long double);
|
4931 |
|
|
X long double sinh (long double);
|
4932 |
|
|
X long double sqrt (long double);
|
4933 |
|
|
X long double tan (long double);
|
4934 |
|
|
X long double tanh (long double);
|
4935 |
|
|
|
4936 |
|
|
Header synopsis
|
4937 |
|
|
|
4938 |
|
|
X template class char_traits;
|
4939 |
|
|
X template<> class char_traits;
|
4940 |
|
|
X template<> class char_traits;
|
4941 |
|
|
X template class allocator;
|
4942 |
|
|
X template >
|
4943 |
|
|
class basic_ios;
|
4944 |
|
|
|
4945 |
|
|
X template >
|
4946 |
|
|
class basic_streambuf;
|
4947 |
|
|
|
4948 |
|
|
X template >
|
4949 |
|
|
class basic_istream;
|
4950 |
|
|
|
4951 |
|
|
X template >
|
4952 |
|
|
class basic_ostream;
|
4953 |
|
|
|
4954 |
|
|
X template >
|
4955 |
|
|
class basic_iostream;
|
4956 |
|
|
|
4957 |
|
|
X template ,
|
4958 |
|
|
class Allocator = allocator >
|
4959 |
|
|
class basic_stringbuf;
|
4960 |
|
|
|
4961 |
|
|
X template ,
|
4962 |
|
|
class Allocator = allocator >
|
4963 |
|
|
class basic_istringstream;
|
4964 |
|
|
|
4965 |
|
|
X template ,
|
4966 |
|
|
class Allocator = allocator >
|
4967 |
|
|
class basic_ostringstream;
|
4968 |
|
|
|
4969 |
|
|
X template ,
|
4970 |
|
|
class Allocator = allocator >
|
4971 |
|
|
class basic_stringstream;
|
4972 |
|
|
|
4973 |
|
|
X template >
|
4974 |
|
|
class basic_filebuf;
|
4975 |
|
|
|
4976 |
|
|
X template >
|
4977 |
|
|
class basic_ifstream;
|
4978 |
|
|
|
4979 |
|
|
X template >
|
4980 |
|
|
class basic_ofstream;
|
4981 |
|
|
|
4982 |
|
|
X template >
|
4983 |
|
|
class basic_fstream;
|
4984 |
|
|
X template >
|
4985 |
|
|
class istreambuf_iterator;
|
4986 |
|
|
|
4987 |
|
|
X template >
|
4988 |
|
|
class ostreambuf_iterator;
|
4989 |
|
|
X typedef basic_ios ios;
|
4990 |
|
|
X typedef basic_ios wios;
|
4991 |
|
|
X typedef basic_streambuf streambuf;
|
4992 |
|
|
X typedef basic_istream istream;
|
4993 |
|
|
X typedef basic_ostream ostream;
|
4994 |
|
|
X typedef basic_iostream iostream;
|
4995 |
|
|
X typedef basic_stringbuf stringbuf;
|
4996 |
|
|
X typedef basic_istringstream istringstream;
|
4997 |
|
|
X typedef basic_ostringstream ostringstream;
|
4998 |
|
|
X typedef basic_stringstream stringstream;
|
4999 |
|
|
X typedef basic_filebuf filebuf;
|
5000 |
|
|
X typedef basic_ifstream ifstream;
|
5001 |
|
|
X typedef basic_ofstream ofstream;
|
5002 |
|
|
X typedef basic_fstream fstream;
|
5003 |
|
|
X typedef basic_streambuf wstreambuf;
|
5004 |
|
|
X typedef basic_istream wistream;
|
5005 |
|
|
X typedef basic_ostream wostream;
|
5006 |
|
|
X typedef basic_iostream wiostream;
|
5007 |
|
|
X typedef basic_stringbuf wstringbuf;
|
5008 |
|
|
X typedef basic_istringstream wistringstream;
|
5009 |
|
|
X typedef basic_ostringstream wostringstream;
|
5010 |
|
|
X typedef basic_stringstream wstringstream;
|
5011 |
|
|
|
5012 |
|
|
X typedef basic_filebuf wfilebuf;
|
5013 |
|
|
X typedef basic_ifstream wifstream;
|
5014 |
|
|
X typedef basic_ofstream wofstream;
|
5015 |
|
|
X typedef basic_fstream wfstream;
|
5016 |
|
|
X template class fpos;
|
5017 |
|
|
X typedef fpos::state_type> streampos;
|
5018 |
|
|
X typedef fpos::state_type> wstreampos;
|
5019 |
|
|
|
5020 |
|
|
27.3 Standard iostream objects [lib.iostream.objects]
|
5021 |
|
|
|
5022 |
|
|
Header synopsis
|
5023 |
|
|
|
5024 |
|
|
T [must also include and ]
|
5025 |
|
|
T extern istream cin;
|
5026 |
|
|
T extern ostream cout;
|
5027 |
|
|
T extern ostream cerr;
|
5028 |
|
|
T extern ostream clog;
|
5029 |
|
|
|
5030 |
|
|
T extern wistream wcin;
|
5031 |
|
|
T extern wostream wcout;
|
5032 |
|
|
T extern wostream wcerr;
|
5033 |
|
|
T extern wostream wclog;
|
5034 |
|
|
|
5035 |
|
|
27.4 Iostreams base classes [lib.iostreams.base]
|
5036 |
|
|
|
5037 |
|
|
Header synopsis
|
5038 |
|
|
|
5039 |
|
|
#include
|
5040 |
|
|
|
5041 |
|
|
T typedef OFF_T streamoff;
|
5042 |
|
|
T typedef SZ_T streamsize;
|
5043 |
|
|
T template class fpos;
|
5044 |
|
|
|
5045 |
|
|
class ios_base;
|
5046 |
|
|
template >
|
5047 |
|
|
class basic_ios;
|
5048 |
|
|
// _lib.std.ios.manip_, manipulators:
|
5049 |
|
|
T ios_base& boolalpha (ios_base& str);
|
5050 |
|
|
T ios_base& noboolalpha(ios_base& str);
|
5051 |
|
|
T ios_base& showbase (ios_base& str);
|
5052 |
|
|
T ios_base& noshowbase (ios_base& str);
|
5053 |
|
|
T ios_base& showpoint (ios_base& str);
|
5054 |
|
|
T ios_base& noshowpoint(ios_base& str);
|
5055 |
|
|
T ios_base& showpos (ios_base& str);
|
5056 |
|
|
T ios_base& noshowpos (ios_base& str);
|
5057 |
|
|
T ios_base& skipws (ios_base& str);
|
5058 |
|
|
T ios_base& noskipws (ios_base& str);
|
5059 |
|
|
T ios_base& nouppercase(ios_base& str);
|
5060 |
|
|
T ios_base& uppercase (ios_base& str);
|
5061 |
|
|
M ios_base& unitbuf (ios_base& str);
|
5062 |
|
|
M ios_base& nounitbuf (ios_base& str);
|
5063 |
|
|
// _lib.adjustfield.manip_ adjustfield:
|
5064 |
|
|
T ios_base& internal (ios_base& str);
|
5065 |
|
|
T ios_base& left (ios_base& str);
|
5066 |
|
|
T ios_base& right (ios_base& str);
|
5067 |
|
|
// _lib.basefield.manip_ basefield:
|
5068 |
|
|
T ios_base& dec (ios_base& str);
|
5069 |
|
|
T ios_base& hex (ios_base& str);
|
5070 |
|
|
T ios_base& oct (ios_base& str);
|
5071 |
|
|
|
5072 |
|
|
// _lib.floatfield.manip_ floatfield:
|
5073 |
|
|
T ios_base& fixed (ios_base& str);
|
5074 |
|
|
T ios_base& scientific (ios_base& str);
|
5075 |
|
|
|
5076 |
|
|
|
5077 |
|
|
27.4.2 Class ios_base [lib.ios.base]
|
5078 |
|
|
|
5079 |
|
|
T class ios_base {
|
5080 |
|
|
public:
|
5081 |
|
|
class failure;
|
5082 |
|
|
T typedef T1 fmtflags;
|
5083 |
|
|
T static const fmtflags boolalpha;
|
5084 |
|
|
T static const fmtflags dec;
|
5085 |
|
|
T static const fmtflags fixed;
|
5086 |
|
|
T static const fmtflags hex;
|
5087 |
|
|
T static const fmtflags internal;
|
5088 |
|
|
T static const fmtflags left;
|
5089 |
|
|
T static const fmtflags oct;
|
5090 |
|
|
T static const fmtflags right;
|
5091 |
|
|
T static const fmtflags scientific;
|
5092 |
|
|
T static const fmtflags showbase;
|
5093 |
|
|
T static const fmtflags showpoint;
|
5094 |
|
|
T static const fmtflags showpos;
|
5095 |
|
|
T static const fmtflags skipws;
|
5096 |
|
|
X static const fmtflags unitbuf;
|
5097 |
|
|
T static const fmtflags uppercase;
|
5098 |
|
|
T static const fmtflags adjustfield;
|
5099 |
|
|
T static const fmtflags basefield;
|
5100 |
|
|
T static const fmtflags floatfield;
|
5101 |
|
|
|
5102 |
|
|
typedef T2 iostate;
|
5103 |
|
|
T static const iostate badbit;
|
5104 |
|
|
T static const iostate eofbit;
|
5105 |
|
|
T static const iostate failbit;
|
5106 |
|
|
T static const iostate goodbit;
|
5107 |
|
|
T typedef T3 openmode;
|
5108 |
|
|
T static const openmode app;
|
5109 |
|
|
T static const openmode ate;
|
5110 |
|
|
T static const openmode binary;
|
5111 |
|
|
T static const openmode in;
|
5112 |
|
|
T static const openmode out;
|
5113 |
|
|
T static const openmode trunc;
|
5114 |
|
|
T typedef T4 seekdir;
|
5115 |
|
|
T static const seekdir beg;
|
5116 |
|
|
T static const seekdir cur;
|
5117 |
|
|
T static const seekdir end;
|
5118 |
|
|
T class Init;
|
5119 |
|
|
// _lib.fmtflags.state_ fmtflags state:
|
5120 |
|
|
T fmtflags flags() const;
|
5121 |
|
|
T fmtflags flags(fmtflags fmtfl);
|
5122 |
|
|
T fmtflags setf(fmtflags fmtfl);
|
5123 |
|
|
T fmtflags setf(fmtflags fmtfl, fmtflags mask);
|
5124 |
|
|
T void unsetf(fmtflags mask);
|
5125 |
|
|
T streamsize precision() const;
|
5126 |
|
|
T streamsize precision(streamsize prec);
|
5127 |
|
|
T streamsize width() const;
|
5128 |
|
|
T streamsize width(streamsize wide);
|
5129 |
|
|
// _lib.ios.base.locales_ locales:
|
5130 |
|
|
T locale imbue(const locale& loc);
|
5131 |
|
|
T locale getloc() const;
|
5132 |
|
|
// _lib.ios.base.storage_ storage:
|
5133 |
|
|
T static int xalloc();
|
5134 |
|
|
T long& iword(int index);
|
5135 |
|
|
T void*& pword(int index);
|
5136 |
|
|
// destructor
|
5137 |
|
|
T virtual ~ios_base();
|
5138 |
|
|
// _lib.ios.base.callback_ callbacks;
|
5139 |
|
|
T enum event { erase_event, imbue_event, copyfmt_event };
|
5140 |
|
|
T typedef void (*event_callback)(event, ios_base&, int index);
|
5141 |
|
|
T void register_callback(event_call_back fn, int index);
|
5142 |
|
|
T static bool sync_with_stdio(bool sync = true);
|
5143 |
|
|
protected:
|
5144 |
|
|
T ios_base();
|
5145 |
|
|
};
|
5146 |
|
|
|
5147 |
|
|
27.4.2.1.1 Class ios_base::failure [lib.ios::failure]
|
5148 |
|
|
|
5149 |
|
|
T class ios_base::failure : public exception {
|
5150 |
|
|
public:
|
5151 |
|
|
T explicit failure(const string& msg);
|
5152 |
|
|
T virtual ~failure();
|
5153 |
|
|
T virtual const char* what() const throw();
|
5154 |
|
|
};
|
5155 |
|
|
|
5156 |
|
|
|
5157 |
|
|
27.4.2.1.6 Class ios_base::Init [lib.ios::Init]
|
5158 |
|
|
|
5159 |
|
|
T class ios_base::Init {
|
5160 |
|
|
public:
|
5161 |
|
|
T Init();
|
5162 |
|
|
T ~Init();
|
5163 |
|
|
};
|
5164 |
|
|
|
5165 |
|
|
|
5166 |
|
|
27.4.3 Template class fpos [lib.fpos]
|
5167 |
|
|
|
5168 |
|
|
X template class fpos {
|
5169 |
|
|
public:
|
5170 |
|
|
// _lib.fpos.members_ Members
|
5171 |
|
|
T stateT state() const;
|
5172 |
|
|
T void state(stateT);
|
5173 |
|
|
private;
|
5174 |
|
|
T stateT st; // exposition only
|
5175 |
|
|
};
|
5176 |
|
|
|
5177 |
|
|
|
5178 |
|
|
27.4.5 Template class basic_ios [lib.ios]
|
5179 |
|
|
|
5180 |
|
|
template >
|
5181 |
|
|
X class basic_ios : public ios_base {
|
5182 |
|
|
public:
|
5183 |
|
|
|
5184 |
|
|
// Types:
|
5185 |
|
|
T typedef charT char_type;
|
5186 |
|
|
T typedef typename traits::int_type int_type;
|
5187 |
|
|
T typedef typename traits::pos_type pos_type;
|
5188 |
|
|
T typedef typename traits::off_type off_type;
|
5189 |
|
|
T typedef traits traits_type;
|
5190 |
|
|
T operator void*() const
|
5191 |
|
|
T bool operator!() const
|
5192 |
|
|
T iostate rdstate() const;
|
5193 |
|
|
T void clear(iostate state = goodbit);
|
5194 |
|
|
T void setstate(iostate state);
|
5195 |
|
|
T bool good() const;
|
5196 |
|
|
T bool eof() const;
|
5197 |
|
|
T bool fail() const;
|
5198 |
|
|
T bool bad() const;
|
5199 |
|
|
T iostate exceptions() const;
|
5200 |
|
|
T void exceptions(iostate except);
|
5201 |
|
|
// _lib.basic.ios.cons_ Constructor/destructor:
|
5202 |
|
|
T explicit basic_ios(basic_streambuf* sb);
|
5203 |
|
|
T virtual ~basic_ios();
|
5204 |
|
|
// _lib.basic.ios.members_ Members:
|
5205 |
|
|
T basic_ostream* tie() const;
|
5206 |
|
|
T basic_ostream* tie(basic_ostream* tiestr);
|
5207 |
|
|
T basic_streambuf* rdbuf() const;
|
5208 |
|
|
T basic_streambuf* rdbuf(basic_streambuf* sb);
|
5209 |
|
|
X basic_ios& copyfmt(const basic_ios& rhs);
|
5210 |
|
|
T char_type fill() const;
|
5211 |
|
|
T char_type fill(char_type ch);
|
5212 |
|
|
// _lib.ios.base.locales_ locales:
|
5213 |
|
|
T locale imbue(const locale& loc);
|
5214 |
|
|
X char narrow(char_type c, char dfault) const;
|
5215 |
|
|
X char_type widen(char c) const;
|
5216 |
|
|
protected:
|
5217 |
|
|
basic_ios();
|
5218 |
|
|
T void init(basic_streambuf* sb);
|
5219 |
|
|
private:
|
5220 |
|
|
T basic_ios(const basic_ios& ); // not defined
|
5221 |
|
|
T basic_ios& operator=(const basic_ios&); // not defined
|
5222 |
|
|
};
|
5223 |
|
|
|
5224 |
|
|
|
5225 |
|
|
27.5 Stream buffers [lib.stream.buffers]
|
5226 |
|
|
|
5227 |
|
|
Header synopsis
|
5228 |
|
|
|
5229 |
|
|
X template >
|
5230 |
|
|
class basic_streambuf;
|
5231 |
|
|
T typedef basic_streambuf streambuf;
|
5232 |
|
|
T typedef basic_streambuf wstreambuf;
|
5233 |
|
|
|
5234 |
|
|
27.5.2 Template class [lib.streambuf]
|
5235 |
|
|
basic_streambuf
|
5236 |
|
|
|
5237 |
|
|
template >
|
5238 |
|
|
X class basic_streambuf {
|
5239 |
|
|
public:
|
5240 |
|
|
|
5241 |
|
|
// Types:
|
5242 |
|
|
T typedef charT char_type;
|
5243 |
|
|
T typedef typename traits::int_type int_type;
|
5244 |
|
|
T typedef typename traits::pos_type pos_type;
|
5245 |
|
|
T typedef typename traits::off_type off_type;
|
5246 |
|
|
T typedef traits traits_type;
|
5247 |
|
|
T virtual ~basic_streambuf();
|
5248 |
|
|
// _lib.streambuf.locales_ locales:
|
5249 |
|
|
T locale pubimbue(const locale &loc);
|
5250 |
|
|
T locale getloc() const;
|
5251 |
|
|
// _lib.streambuf.buffer_ buffer and positioning:
|
5252 |
|
|
T basic_streambuf*
|
5253 |
|
|
pubsetbuf(char_type* s, streamsize n);
|
5254 |
|
|
T pos_type pubseekoff(off_type off, ios_base::seekdir way,
|
5255 |
|
|
ios_base::openmode which =
|
5256 |
|
|
ios_base::in | ios_base::out);
|
5257 |
|
|
T pos_type pubseekpos(pos_type sp,
|
5258 |
|
|
ios_base::openmode which =
|
5259 |
|
|
ios_base::in | ios_base::out);
|
5260 |
|
|
T int pubsync();
|
5261 |
|
|
|
5262 |
|
|
// Get and put areas:
|
5263 |
|
|
// _lib.streambuf.pub.get_ Get area:
|
5264 |
|
|
T streamsize in_avail();
|
5265 |
|
|
T int_type snextc();
|
5266 |
|
|
T int_type sbumpc();
|
5267 |
|
|
T int_type sgetc();
|
5268 |
|
|
T streamsize sgetn(char_type* s, streamsize n);
|
5269 |
|
|
// _lib.streambuf.pub.pback_ Putback:
|
5270 |
|
|
X int_type sputbackc(char_type c);
|
5271 |
|
|
X int_type sungetc();
|
5272 |
|
|
// _lib.streambuf.pub.put_ Put area:
|
5273 |
|
|
T int_type sputc(char_type c);
|
5274 |
|
|
X streamsize sputn(const char_type* s, streamsize n);
|
5275 |
|
|
protected:
|
5276 |
|
|
T basic_streambuf();
|
5277 |
|
|
// _lib.streambuf.get.area_ Get area:
|
5278 |
|
|
T char_type* eback() const;
|
5279 |
|
|
T char_type* gptr() const;
|
5280 |
|
|
T char_type* egptr() const;
|
5281 |
|
|
T void gbump(int n);
|
5282 |
|
|
T void setg(char_type* gbeg, char_type* gnext, char_type* gend);
|
5283 |
|
|
// _lib.streambuf.put.area_ Put area:
|
5284 |
|
|
T char_type* pbase() const;
|
5285 |
|
|
T char_type* pptr() const;
|
5286 |
|
|
T char_type* epptr() const;
|
5287 |
|
|
T void pbump(int n);
|
5288 |
|
|
T void setp(char_type* pbeg, char_type* pend);
|
5289 |
|
|
// _lib.streambuf.virtuals_ virtual functions:
|
5290 |
|
|
// _lib.streambuf.virt.locales_ Locales:
|
5291 |
|
|
T virtual void imbue(const locale &loc);
|
5292 |
|
|
// _lib.streambuf.virt.buffer_ Buffer management and positioning:
|
5293 |
|
|
T virtual basic_streambuf*
|
5294 |
|
|
setbuf(char_type* s, streamsize n);
|
5295 |
|
|
T virtual pos_type seekoff(off_type off, ios_base::seekdir way,
|
5296 |
|
|
ios_base::openmode which = ios_base::in | ios_base::out);
|
5297 |
|
|
T virtual pos_type seekpos(pos_type sp,
|
5298 |
|
|
ios_base::openmode which = ios_base::in | ios_base::out);
|
5299 |
|
|
T virtual int sync();
|
5300 |
|
|
// _lib.streambuf.virt.get_ Get area:
|
5301 |
|
|
T virtual int showmanyc();
|
5302 |
|
|
T virtual streamsize xsgetn(char_type* s, streamsize n);
|
5303 |
|
|
T virtual int_type underflow();
|
5304 |
|
|
T virtual int_type uflow();
|
5305 |
|
|
// _lib.streambuf.virt.pback_ Putback:
|
5306 |
|
|
T virtual int_type pbackfail(int_type c = traits::eof());
|
5307 |
|
|
// _lib.streambuf.virt.put_ Put area:
|
5308 |
|
|
X virtual streamsize xsputn(const char_type* s, streamsize n);
|
5309 |
|
|
T virtual int_type overflow (int_type c = traits::eof());
|
5310 |
|
|
};
|
5311 |
|
|
|
5312 |
|
|
27.6 Formatting and manipulators [lib.iostream.format]
|
5313 |
|
|
|
5314 |
|
|
Header synopsis
|
5315 |
|
|
|
5316 |
|
|
T template >
|
5317 |
|
|
class basic_istream;
|
5318 |
|
|
T typedef basic_istream istream;
|
5319 |
|
|
T typedef basic_istream wistream;
|
5320 |
|
|
|
5321 |
|
|
T template >
|
5322 |
|
|
class basic_iostream;
|
5323 |
|
|
T typedef basic_iostream iostream;
|
5324 |
|
|
T typedef basic_iostream wiostream;
|
5325 |
|
|
|
5326 |
|
|
X template
|
5327 |
|
|
basic_istream& ws(basic_istream& is);
|
5328 |
|
|
|
5329 |
|
|
Header synopsis
|
5330 |
|
|
|
5331 |
|
|
X template >
|
5332 |
|
|
class basic_ostream;
|
5333 |
|
|
T typedef basic_ostream ostream;
|
5334 |
|
|
T typedef basic_ostream wostream;
|
5335 |
|
|
|
5336 |
|
|
T template
|
5337 |
|
|
basic_ostream& endl(basic_ostream& os);
|
5338 |
|
|
T template
|
5339 |
|
|
basic_ostream& ends(basic_ostream& os);
|
5340 |
|
|
T template
|
5341 |
|
|
basic_ostream& flush(basic_ostream& os);
|
5342 |
|
|
|
5343 |
|
|
Header synopsis
|
5344 |
|
|
|
5345 |
|
|
// Types T1, T2, ... are unspecified implementation types
|
5346 |
|
|
T T1 resetiosflags(ios_base::fmtflags mask);
|
5347 |
|
|
T T2 setiosflags (ios_base::fmtflags mask);
|
5348 |
|
|
T T3 setbase(int base);
|
5349 |
|
|
T template T4 setfill(charT c);
|
5350 |
|
|
T T5 setprecision(int n);
|
5351 |
|
|
T T6 setw(int n);
|
5352 |
|
|
|
5353 |
|
|
|
5354 |
|
|
27.6.1.1 Template class basic_istream [lib.istream]
|
5355 |
|
|
|
5356 |
|
|
template >
|
5357 |
|
|
T class basic_istream : virtual public basic_ios {
|
5358 |
|
|
public:
|
5359 |
|
|
// Types (inherited from basic_ios (_lib.ios_)):
|
5360 |
|
|
T typedef charT char_type;
|
5361 |
|
|
T typedef typename traits::int_type int_type;
|
5362 |
|
|
T typedef typename traits::pos_type pos_type;
|
5363 |
|
|
T typedef typename traits::off_type off_type;
|
5364 |
|
|
T typedef traits traits_type;
|
5365 |
|
|
// _lib.istream.cons_ Constructor/destructor:
|
5366 |
|
|
T explicit basic_istream(basic_streambuf* sb);
|
5367 |
|
|
T virtual ~basic_istream();
|
5368 |
|
|
// _lib.istream::sentry_ Prefix/suffix:
|
5369 |
|
|
T class sentry;
|
5370 |
|
|
|
5371 |
|
|
// _lib.istream.formatted_ Formatted input:
|
5372 |
|
|
T basic_istream& operator>>
|
5373 |
|
|
(basic_istream& (*pf)(basic_istream&))
|
5374 |
|
|
T basic_istream& operator>>
|
5375 |
|
|
(basic_ios& (*pf)(basic_ios&))
|
5376 |
|
|
T basic_istream& operator>>
|
5377 |
|
|
(ios_base& (*pf)(ios_base&))
|
5378 |
|
|
S basic_istream& operator>>(bool& n);
|
5379 |
|
|
S basic_istream& operator>>(short& n);
|
5380 |
|
|
S basic_istream& operator>>(unsigned short& n);
|
5381 |
|
|
S basic_istream& operator>>(int& n);
|
5382 |
|
|
S basic_istream& operator>>(unsigned int& n);
|
5383 |
|
|
S basic_istream& operator>>(long& n);
|
5384 |
|
|
S basic_istream& operator>>(unsigned long& n);
|
5385 |
|
|
S basic_istream& operator>>(float& f);
|
5386 |
|
|
S basic_istream& operator>>(double& f);
|
5387 |
|
|
S basic_istream& operator>>(long double& f);
|
5388 |
|
|
S basic_istream& operator>>(void*& p);
|
5389 |
|
|
S basic_istream& operator>>
|
5390 |
|
|
(basic_streambuf* sb);
|
5391 |
|
|
// _lib.istream.unformatted_ Unformatted input:
|
5392 |
|
|
T streamsize gcount() const;
|
5393 |
|
|
S int_type get();
|
5394 |
|
|
S basic_istream& get(char_type& c);
|
5395 |
|
|
S basic_istream& get(char_type* s, streamsize n);
|
5396 |
|
|
S basic_istream& get(char_type* s, streamsize n,
|
5397 |
|
|
char_type delim);
|
5398 |
|
|
S basic_istream& get(basic_streambuf& sb);
|
5399 |
|
|
S basic_istream& get(basic_streambuf& sb,
|
5400 |
|
|
char_type delim);
|
5401 |
|
|
S basic_istream& getline(char_type* s, streamsize n);
|
5402 |
|
|
S basic_istream& getline(char_type* s, streamsize n,
|
5403 |
|
|
char_type delim);
|
5404 |
|
|
S basic_istream& ignore
|
5405 |
|
|
(streamsize n = 1, int_type delim = traits::eof());
|
5406 |
|
|
S int_type peek();
|
5407 |
|
|
S basic_istream& read (char_type* s, streamsize n);
|
5408 |
|
|
S streamsize readsome(char_type* s, streamsize n);
|
5409 |
|
|
S basic_istream& putback(char_type c);
|
5410 |
|
|
S basic_istream& unget();
|
5411 |
|
|
S int sync();
|
5412 |
|
|
|
5413 |
|
|
S pos_type tellg();
|
5414 |
|
|
S basic_istream& seekg(pos_type);
|
5415 |
|
|
S basic_istream& seekg(off_type, ios_base::seekdir);
|
5416 |
|
|
};
|
5417 |
|
|
|
5418 |
|
|
// _lib.istream::extractors_ character extraction templates:
|
5419 |
|
|
S template
|
5420 |
|
|
basic_istream& operator>>(basic_istream&,
|
5421 |
|
|
charT&);
|
5422 |
|
|
S template
|
5423 |
|
|
basic_istream& operator>>(basic_istream&,
|
5424 |
|
|
unsigned char&);
|
5425 |
|
|
S template
|
5426 |
|
|
basic_istream& operator>>(basic_istream&,
|
5427 |
|
|
signed char&);
|
5428 |
|
|
|
5429 |
|
|
S template
|
5430 |
|
|
basic_istream& operator>>(basic_istream&,
|
5431 |
|
|
charT*);
|
5432 |
|
|
S template
|
5433 |
|
|
basic_istream& operator>>(basic_istream&,
|
5434 |
|
|
unsigned char*);
|
5435 |
|
|
S template
|
5436 |
|
|
basic_istream& operator>>(basic_istream&,
|
5437 |
|
|
signed char*);
|
5438 |
|
|
|
5439 |
|
|
27.6.1.1.2 Class basic_istream::sentry [lib.istream::sentry]
|
5440 |
|
|
|
5441 |
|
|
|
5442 |
|
|
template >
|
5443 |
|
|
S class basic_istream::sentry {
|
5444 |
|
|
typedef traits traits_type;
|
5445 |
|
|
S bool ok_; // exposition only
|
5446 |
|
|
public:
|
5447 |
|
|
S explicit sentry(basic_istream& is, bool noskipws = false);
|
5448 |
|
|
S ~sentry();
|
5449 |
|
|
S operator bool() const { return ok_; }
|
5450 |
|
|
private:
|
5451 |
|
|
T sentry(const sentry&); // not defined
|
5452 |
|
|
T sentry& operator=(const sentry&); // not defined
|
5453 |
|
|
};
|
5454 |
|
|
|
5455 |
|
|
|
5456 |
|
|
27.6.1.5 Template class basic_iostream [lib.iostreamclass]
|
5457 |
|
|
|
5458 |
|
|
template >
|
5459 |
|
|
T class basic_iostream :
|
5460 |
|
|
public basic_istream,
|
5461 |
|
|
public basic_ostream {
|
5462 |
|
|
public:
|
5463 |
|
|
// constructor/destructor
|
5464 |
|
|
T explicit basic_iostream(basic_streambuf* sb);
|
5465 |
|
|
T virtual ~basic_iostream();
|
5466 |
|
|
};
|
5467 |
|
|
|
5468 |
|
|
|
5469 |
|
|
27.6.2.1 Template class basic_ostream [lib.ostream]
|
5470 |
|
|
|
5471 |
|
|
template >
|
5472 |
|
|
X class basic_ostream : virtual public basic_ios {
|
5473 |
|
|
public:
|
5474 |
|
|
// Types (inherited from basic_ios (_lib.ios_)):
|
5475 |
|
|
T typedef charT char_type;
|
5476 |
|
|
T typedef typename traits::int_type int_type;
|
5477 |
|
|
T typedef typename traits::pos_type pos_type;
|
5478 |
|
|
T typedef typename traits::off_type off_type;
|
5479 |
|
|
T typedef traits traits_type;
|
5480 |
|
|
// _lib.ostream.cons_ Constructor/destructor:
|
5481 |
|
|
T explicit basic_ostream(basic_streambuf* sb);
|
5482 |
|
|
T virtual ~basic_ostream();
|
5483 |
|
|
// _lib.ostream::sentry_ Prefix/suffix:
|
5484 |
|
|
T class sentry;
|
5485 |
|
|
// _lib.ostream.formatted_ Formatted output:
|
5486 |
|
|
T basic_ostream& operator<<
|
5487 |
|
|
(basic_ostream& (*pf)(basic_ostream&));
|
5488 |
|
|
T basic_ostream& operator<<
|
5489 |
|
|
(basic_ios& (*pf)(basic_ios&));
|
5490 |
|
|
T basic_ostream& operator<<
|
5491 |
|
|
(ios_base& (*pf)(ios_base&));
|
5492 |
|
|
T basic_ostream& operator<<(bool n);
|
5493 |
|
|
T basic_ostream& operator<<(short n);
|
5494 |
|
|
T basic_ostream& operator<<(unsigned short n);
|
5495 |
|
|
T basic_ostream& operator<<(int n);
|
5496 |
|
|
T basic_ostream& operator<<(unsigned int n);
|
5497 |
|
|
T basic_ostream& operator<<(long n);
|
5498 |
|
|
T basic_ostream& operator<<(unsigned long n);
|
5499 |
|
|
S basic_ostream& operator<<(float f);
|
5500 |
|
|
S basic_ostream& operator<<(double f);
|
5501 |
|
|
S basic_ostream& operator<<(long double f);
|
5502 |
|
|
T basic_ostream& operator<<(const void* p);
|
5503 |
|
|
X basic_ostream& operator<<
|
5504 |
|
|
(basic_streambuf* sb);
|
5505 |
|
|
// _lib.ostream.unformatted_ Unformatted output:
|
5506 |
|
|
T basic_ostream& put(char_type c);
|
5507 |
|
|
T basic_ostream& write(const char_type* s, streamsize n);
|
5508 |
|
|
X basic_ostream& flush();
|
5509 |
|
|
|
5510 |
|
|
// _lib.ostream.seeks_ seeks:
|
5511 |
|
|
S pos_type tellp();
|
5512 |
|
|
S basic_ostream& seekp(pos_type);
|
5513 |
|
|
S basic_ostream& seekp(off_type, ios_base::seekdir);
|
5514 |
|
|
};
|
5515 |
|
|
// _lib.ostream.inserters.character_ character inserters
|
5516 |
|
|
X template
|
5517 |
|
|
basic_ostream& operator<<(basic_ostream&,
|
5518 |
|
|
charT);
|
5519 |
|
|
X template
|
5520 |
|
|
basic_ostream& operator<<(basic_ostream&,
|
5521 |
|
|
char);
|
5522 |
|
|
// specialization
|
5523 |
|
|
X template
|
5524 |
|
|
basic_ostream& operator<<(basic_ostream&,
|
5525 |
|
|
char);
|
5526 |
|
|
// signed and unsigned
|
5527 |
|
|
X template
|
5528 |
|
|
basic_ostream& operator<<(basic_ostream&,
|
5529 |
|
|
signed char);
|
5530 |
|
|
X template
|
5531 |
|
|
basic_ostream& operator<<(basic_ostream&,
|
5532 |
|
|
unsigned char)
|
5533 |
|
|
X template
|
5534 |
|
|
basic_ostream& operator<<(basic_ostream&,
|
5535 |
|
|
const charT*);
|
5536 |
|
|
X template
|
5537 |
|
|
basic_ostream& operator<<(basic_ostream&,
|
5538 |
|
|
const char*);
|
5539 |
|
|
// partial specializationss
|
5540 |
|
|
X template
|
5541 |
|
|
basic_ostream& operator<<(basic_ostream&,
|
5542 |
|
|
const char*);
|
5543 |
|
|
// signed and unsigned
|
5544 |
|
|
X template
|
5545 |
|
|
basic_ostream& operator<<(basic_ostream&,
|
5546 |
|
|
const signed char*);
|
5547 |
|
|
X template
|
5548 |
|
|
basic_ostream& operator<<(basic_ostream&,
|
5549 |
|
|
const unsigned char*);
|
5550 |
|
|
|
5551 |
|
|
|
5552 |
|
|
27.6.2.3 Class basic_ostream::sentry [lib.ostream::sentry]
|
5553 |
|
|
|
5554 |
|
|
template >
|
5555 |
|
|
X class basic_ostream::sentry {
|
5556 |
|
|
bool ok_; // exposition only
|
5557 |
|
|
public:
|
5558 |
|
|
X explicit sentry(basic_ostream& os);
|
5559 |
|
|
X ~sentry();
|
5560 |
|
|
X operator bool() const { return ok_; }
|
5561 |
|
|
private
|
5562 |
|
|
X sentry(const sentry&); // not defined
|
5563 |
|
|
X sentry& operator=(const sentry&); // not defined
|
5564 |
|
|
};
|
5565 |
|
|
|
5566 |
|
|
27.7 String-based streams [lib.string.streams]
|
5567 |
|
|
|
5568 |
|
|
Header synopsis
|
5569 |
|
|
|
5570 |
|
|
X template ,
|
5571 |
|
|
class Allocator = allocator >
|
5572 |
|
|
class basic_stringbuf;
|
5573 |
|
|
|
5574 |
|
|
T typedef basic_stringbuf stringbuf;
|
5575 |
|
|
T typedef basic_stringbuf wstringbuf;
|
5576 |
|
|
|
5577 |
|
|
template ,
|
5578 |
|
|
class Allocator = allocator >
|
5579 |
|
|
X class basic_istringstream;
|
5580 |
|
|
|
5581 |
|
|
T typedef basic_istringstream istringstream;
|
5582 |
|
|
T typedef basic_istringstream wistringstream;
|
5583 |
|
|
|
5584 |
|
|
template ,
|
5585 |
|
|
class Allocator = allocator >
|
5586 |
|
|
X class basic_ostringstream;
|
5587 |
|
|
T typedef basic_ostringstream ostringstream;
|
5588 |
|
|
T typedef basic_ostringstream wostringstream;
|
5589 |
|
|
|
5590 |
|
|
template ,
|
5591 |
|
|
class Allocator = allocator >
|
5592 |
|
|
X class basic_stringstream;
|
5593 |
|
|
T typedef basic_stringstream stringstream;
|
5594 |
|
|
T typedef basic_stringstream wstringstream;
|
5595 |
|
|
|
5596 |
|
|
27.7.1 Template class basic_stringbuf [lib.stringbuf]
|
5597 |
|
|
|
5598 |
|
|
template ,
|
5599 |
|
|
class Allocator = allocator >
|
5600 |
|
|
X class basic_stringbuf : public basic_streambuf {
|
5601 |
|
|
public:
|
5602 |
|
|
T typedef charT char_type;
|
5603 |
|
|
T typedef typename traits::int_type int_type;
|
5604 |
|
|
T typedef typename traits::pos_type pos_type;
|
5605 |
|
|
T typedef typename traits::off_type off_type;
|
5606 |
|
|
T typedef traits traits_type;
|
5607 |
|
|
// _lib.stringbuf.cons_ Constructors:
|
5608 |
|
|
S explicit basic_stringbuf(ios_base::openmode which
|
5609 |
|
|
= ios_base::in | ios_base::out);
|
5610 |
|
|
S explicit basic_stringbuf
|
5611 |
|
|
(const basic_string& str,
|
5612 |
|
|
ios_base::openmode which = ios_base::in | ios_base::out);
|
5613 |
|
|
// _lib.stringbuf.members_ Get and set:
|
5614 |
|
|
S basic_string str() const;
|
5615 |
|
|
S void str(const basic_string& s);
|
5616 |
|
|
|
5617 |
|
|
protected:
|
5618 |
|
|
// _lib.stringbuf.virtuals_ Overridden virtual functions:
|
5619 |
|
|
S virtual int_type underflow();
|
5620 |
|
|
S virtual int_type pbackfail(int_type c = traits::eof());
|
5621 |
|
|
S virtual int_type overflow (int_type c = traits::eof());
|
5622 |
|
|
S virtual basic_streambuf* setbuf(charT*, streamsize);
|
5623 |
|
|
|
5624 |
|
|
S virtual pos_type seekoff(off_type off, ios_base::seekdir way,
|
5625 |
|
|
ios_base::openmode which
|
5626 |
|
|
= ios_base::in | ios_base::out);
|
5627 |
|
|
S virtual pos_type seekpos(pos_type sp,
|
5628 |
|
|
ios_base::openmode which
|
5629 |
|
|
= ios_base::in | ios_base::out);
|
5630 |
|
|
};
|
5631 |
|
|
|
5632 |
|
|
|
5633 |
|
|
27.7.2 Template class basic_istringstream [lib.istringstream]
|
5634 |
|
|
|
5635 |
|
|
template ,
|
5636 |
|
|
class Allocator = allocator >
|
5637 |
|
|
X class basic_istringstream : public basic_istream {
|
5638 |
|
|
public:
|
5639 |
|
|
T typedef charT char_type;
|
5640 |
|
|
T typedef typename traits::int_type int_type;
|
5641 |
|
|
T typedef typename traits::pos_type pos_type;
|
5642 |
|
|
T typedef typename traits::off_type off_type;
|
5643 |
|
|
T typedef traits traits_type;
|
5644 |
|
|
// _lib.istringstream.cons_ Constructors:
|
5645 |
|
|
S explicit basic_istringstream(ios_base::openmode which = ios_base::in);
|
5646 |
|
|
S explicit basic_istringstream(
|
5647 |
|
|
const basic_string& str,
|
5648 |
|
|
ios_base::openmode which = ios_base::in);
|
5649 |
|
|
|
5650 |
|
|
// _lib.istringstream.members_ Members:
|
5651 |
|
|
S basic_stringbuf* rdbuf() const;
|
5652 |
|
|
S basic_string str() const;
|
5653 |
|
|
S void str(const basic_string& s);
|
5654 |
|
|
private:
|
5655 |
|
|
// basic_stringbuf sb; exposition only
|
5656 |
|
|
};
|
5657 |
|
|
|
5658 |
|
|
27.7.3 Class basic_ostringstream [lib.ostringstream]
|
5659 |
|
|
|
5660 |
|
|
template ,
|
5661 |
|
|
class Allocator = allocator >
|
5662 |
|
|
X class basic_ostringstream : public basic_ostream {
|
5663 |
|
|
public:
|
5664 |
|
|
|
5665 |
|
|
// Types:
|
5666 |
|
|
T typedef charT char_type;
|
5667 |
|
|
T typedef typename traits::int_type int_type;
|
5668 |
|
|
T typedef typename traits::pos_type pos_type;
|
5669 |
|
|
T typedef typename traits::off_type off_type;
|
5670 |
|
|
// _lib.ostringstream.cons_ Constructors/destructor:
|
5671 |
|
|
S explicit basic_ostringstream(ios_base::openmode which = ios_base::out);
|
5672 |
|
|
S explicit basic_ostringstream(
|
5673 |
|
|
const basic_string& str,
|
5674 |
|
|
ios_base::openmode which = ios_base::out);
|
5675 |
|
|
// _lib.ostringstream.members_ Members:
|
5676 |
|
|
S basic_stringbuf* rdbuf() const;
|
5677 |
|
|
S basic_string str() const;
|
5678 |
|
|
S void str(const basic_string& s);
|
5679 |
|
|
};
|
5680 |
|
|
|
5681 |
|
|
|
5682 |
|
|
27.7.4 Template class basic_stringstream [lib.stringstream]
|
5683 |
|
|
|
5684 |
|
|
template ,
|
5685 |
|
|
class Allocator = allocator >
|
5686 |
|
|
X class basic_stringstream
|
5687 |
|
|
: public basic_iostream {
|
5688 |
|
|
public:
|
5689 |
|
|
// Types
|
5690 |
|
|
T typedef charT char_type;
|
5691 |
|
|
T typedef typename traits::int_type int_type;
|
5692 |
|
|
T typedef typename traits::pos_type pos_type;
|
5693 |
|
|
T typedef typename traits::off_type off_type;
|
5694 |
|
|
// constructors/destructors
|
5695 |
|
|
S explicit basic_stringstream(
|
5696 |
|
|
ios_base::openmode which = ios_base::out|ios_base::in);
|
5697 |
|
|
S explicit basic_stringstream(
|
5698 |
|
|
const basic_string& str,
|
5699 |
|
|
ios_base::openmode which = ios_base::out|ios_base::in);
|
5700 |
|
|
// Members:
|
5701 |
|
|
S basic_stringbuf* rdbuf() const;
|
5702 |
|
|
S basic_string str() const;
|
5703 |
|
|
S void str(const basic_string& str);
|
5704 |
|
|
};
|
5705 |
|
|
|
5706 |
|
|
|
5707 |
|
|
|
5708 |
|
|
27.8.1 File streams [lib.fstreams]
|
5709 |
|
|
|
5710 |
|
|
|
5711 |
|
|
Header synopsis
|
5712 |
|
|
|
5713 |
|
|
X template >
|
5714 |
|
|
class basic_filebuf;
|
5715 |
|
|
T typedef basic_filebuf filebuf;
|
5716 |
|
|
T typedef basic_filebuf wfilebuf;
|
5717 |
|
|
|
5718 |
|
|
X template >
|
5719 |
|
|
class basic_ifstream;
|
5720 |
|
|
T typedef basic_ifstream ifstream;
|
5721 |
|
|
T typedef basic_ifstream wifstream;
|
5722 |
|
|
|
5723 |
|
|
X template >
|
5724 |
|
|
class basic_ofstream;
|
5725 |
|
|
T typedef basic_ofstream ofstream;
|
5726 |
|
|
T typedef basic_ofstream wofstream;
|
5727 |
|
|
|
5728 |
|
|
X template >
|
5729 |
|
|
class basic_fstream;
|
5730 |
|
|
T typedef basic_fstream fstream;
|
5731 |
|
|
T typedef basic_fstream wfstream;
|
5732 |
|
|
|
5733 |
|
|
27.8.1.1 Template class basic_filebuf [lib.filebuf]
|
5734 |
|
|
|
5735 |
|
|
template >
|
5736 |
|
|
X class basic_filebuf : public basic_streambuf {
|
5737 |
|
|
public:
|
5738 |
|
|
T typedef charT char_type;
|
5739 |
|
|
T typedef typename traits::int_type int_type;
|
5740 |
|
|
T typedef typename traits::pos_type pos_type;
|
5741 |
|
|
T typedef typename traits::off_type off_type;
|
5742 |
|
|
T typedef traits traits_type;
|
5743 |
|
|
// _lib.filebuf.cons_ Constructors/destructor:
|
5744 |
|
|
X basic_filebuf();
|
5745 |
|
|
X virtual ~basic_filebuf();
|
5746 |
|
|
// _lib.filebuf.members_ Members:
|
5747 |
|
|
T bool is_open() const;
|
5748 |
|
|
X basic_filebuf* open
|
5749 |
|
|
(const char* s, ios_base::openmode mode);
|
5750 |
|
|
X basic_filebuf* close();
|
5751 |
|
|
protected:
|
5752 |
|
|
// _lib.filebuf.virtuals_ Overridden virtual functions:
|
5753 |
|
|
X virtual streamsize showmanyc();
|
5754 |
|
|
X virtual int_type underflow();
|
5755 |
|
|
X virtual int_type uflow();
|
5756 |
|
|
X virtual int_type pbackfail(int_type c = traits::eof());
|
5757 |
|
|
X virtual int_type overflow (int_type c = traits::eof());
|
5758 |
|
|
S virtual basic_streambuf*
|
5759 |
|
|
setbuf(char_type* s, streamsize n);
|
5760 |
|
|
S virtual pos_type seekoff(off_type off, ios_base::seekdir way,
|
5761 |
|
|
ios_base::openmode which
|
5762 |
|
|
= ios_base::in | ios_base::out);
|
5763 |
|
|
S virtual pos_type seekpos(pos_type sp, ios_base::openmode which
|
5764 |
|
|
= ios_base::in | ios_base::out);
|
5765 |
|
|
S virtual int sync();
|
5766 |
|
|
S virtual void imbue(const locale& loc);
|
5767 |
|
|
};
|
5768 |
|
|
|
5769 |
|
|
|
5770 |
|
|
|
5771 |
|
|
27.8.1.5 Template class basic_ifstream [lib.ifstream]
|
5772 |
|
|
|
5773 |
|
|
template >
|
5774 |
|
|
X class basic_ifstream : public basic_istream {
|
5775 |
|
|
public:
|
5776 |
|
|
T typedef charT char_type;
|
5777 |
|
|
T typedef typename traits::int_type int_type;
|
5778 |
|
|
T typedef typename traits::pos_type pos_type;
|
5779 |
|
|
T typedef typename traits::off_type off_type;
|
5780 |
|
|
T typedef traits traits_type;
|
5781 |
|
|
// _lib.ifstream.cons_ Constructors:
|
5782 |
|
|
S basic_ifstream();
|
5783 |
|
|
S explicit basic_ifstream(const char* s,
|
5784 |
|
|
ios_base::openmode mode = ios_base::in);
|
5785 |
|
|
// _lib.ifstream.members_ Members:
|
5786 |
|
|
S basic_filebuf* rdbuf() const;
|
5787 |
|
|
S bool is_open();
|
5788 |
|
|
S void open(const char* s, ios_base::openmode mode = ios_base::in);
|
5789 |
|
|
S void close();
|
5790 |
|
|
};
|
5791 |
|
|
|
5792 |
|
|
|
5793 |
|
|
27.8.1.8 Template class basic_ofstream [lib.ofstream]
|
5794 |
|
|
|
5795 |
|
|
template >
|
5796 |
|
|
X class basic_ofstream : public basic_ostream {
|
5797 |
|
|
public:
|
5798 |
|
|
T typedef charT char_type;
|
5799 |
|
|
T typedef typename traits::int_type int_type;
|
5800 |
|
|
T typedef typename traits::pos_type pos_type;
|
5801 |
|
|
T typedef typename traits::off_type off_type;
|
5802 |
|
|
T typedef traits traits_type;
|
5803 |
|
|
// _lib.ofstream.cons_ Constructors:
|
5804 |
|
|
X basic_ofstream();
|
5805 |
|
|
X explicit basic_ofstream(const char* s,
|
5806 |
|
|
ios_base::openmode mode
|
5807 |
|
|
= ios_base::out);
|
5808 |
|
|
// _lib.ofstream.members_ Members:
|
5809 |
|
|
X basic_filebuf* rdbuf() const;
|
5810 |
|
|
T bool is_open();
|
5811 |
|
|
X void open(const char* s, ios_base::openmode mode = ios_base::out);
|
5812 |
|
|
X void close();
|
5813 |
|
|
};
|
5814 |
|
|
|
5815 |
|
|
|
5816 |
|
|
27.8.1.11 Template class basic_fstream [lib.fstream]
|
5817 |
|
|
|
5818 |
|
|
template >
|
5819 |
|
|
X class basic_fstream
|
5820 |
|
|
: public basic_iostream {
|
5821 |
|
|
public:
|
5822 |
|
|
T typedef charT char_type;
|
5823 |
|
|
T typedef typename traits::int_type int_type;
|
5824 |
|
|
T typedef typename traits::pos_type pos_type;
|
5825 |
|
|
T typedef typename traits::off_type off_type;
|
5826 |
|
|
T typedef traits traits_type;
|
5827 |
|
|
// constructors/destructor
|
5828 |
|
|
S basic_fstream();
|
5829 |
|
|
S explicit basic_fstream(
|
5830 |
|
|
const char* s,
|
5831 |
|
|
ios_base::openmode mode = ios_base::in|ios_base::out);
|
5832 |
|
|
|
5833 |
|
|
// Members:
|
5834 |
|
|
S basic_filebuf* rdbuf() const;
|
5835 |
|
|
S bool is_open();
|
5836 |
|
|
S void open(
|
5837 |
|
|
const char* s,
|
5838 |
|
|
ios_base::openmode mode = ios_base::in|ios_base::out);
|
5839 |
|
|
S void close();
|
5840 |
|
|
};
|
5841 |
|
|
|
5842 |
|
|
|
5843 |
|
|
|
5844 |
|
|
27.8.2 C Library files [lib.c.files]
|
5845 |
|
|
|
5846 |
|
|
|
5847 |
|
|
Table 13--Header synopsis
|
5848 |
|
|
Macros:
|
5849 |
|
|
X BUFSIZ L_tmpnam SEEK_SET TMP_MAX
|
5850 |
|
|
X EOF NULL stderr _IOFBF
|
5851 |
|
|
X FILENAME_MAX SEEK_CUR stdin _IOLBF
|
5852 |
|
|
X FOPEN_MAX SEEK_END stdout _IONBF
|
5853 |
|
|
|
5854 |
|
|
X Types: FILE fpos_t size_t
|
5855 |
|
|
Functions:
|
5856 |
|
|
X clearerr fgets fscanf gets rewind
|
5857 |
|
|
X fclose fopen fseek perror scanf tmpnam
|
5858 |
|
|
X feof fprintf fsetpos printf setbuf ungetc
|
5859 |
|
|
X ferror fputc ftell putc setvbuf vprintf
|
5860 |
|
|
X fflush fputs fwrite puts sprintf vfprintf
|
5861 |
|
|
X fgetc fread getc remove sscanf vsprintf
|
5862 |
|
|
X fgetpos freopen getchar putchar rename tmpfile
|
5863 |
|
|
|
5864 |
|
|
|
5865 |
|
|
|
5866 |
|
|
|
5867 |
|
|
1.5 Standard C library headers [depr.c.headers]
|
5868 |
|
|
|
5869 |
|
|
X
|
5870 |
|
|
|
5871 |
|
|
|
5872 |
|
|
|
5873 |
|
|
|
5874 |
|
|
1.6 Old iostreams members [depr.ios.members]
|
5875 |
|
|
|
5876 |
|
|
[Note: these should be #ifdef'd to permit diagnostics if used.]
|
5877 |
|
|
namespace std {
|
5878 |
|
|
class ios_base {
|
5879 |
|
|
public:
|
5880 |
|
|
T typedef T1 io_state;
|
5881 |
|
|
T typedef T2 open_mode;
|
5882 |
|
|
T typedef T3 seek_dir;
|
5883 |
|
|
T typedef OFF_T streamoff;
|
5884 |
|
|
T typedef OFF_T streampos;
|
5885 |
|
|
// remainder unchanged
|
5886 |
|
|
};
|
5887 |
|
|
}
|
5888 |
|
|
|
5889 |
|
|
[Note: these should be #ifdef'd to permit diagnostics if used.]
|
5890 |
|
|
namespace std {
|
5891 |
|
|
template >
|
5892 |
|
|
class basic_streambuf {
|
5893 |
|
|
public:
|
5894 |
|
|
T void stossc();
|
5895 |
|
|
// remainder unchanged
|
5896 |
|
|
};
|
5897 |
|
|
}
|
5898 |
|
|
|
5899 |
|
|
8 An implementation may provide the following member functions that
|
5900 |
|
|
overload signatures specified in clause _lib.iostreams_:
|
5901 |
|
|
|
5902 |
|
|
[Note: the following overloads should be #ifdef'd to permit
|
5903 |
|
|
diagnostics to be emitted, by default, if used.]
|
5904 |
|
|
|
5905 |
|
|
template class basic_ios {
|
5906 |
|
|
public:
|
5907 |
|
|
M void clear(io_state state);
|
5908 |
|
|
M void setstate(io_state state);
|
5909 |
|
|
// remainder unchanged
|
5910 |
|
|
};
|
5911 |
|
|
class ios_base {
|
5912 |
|
|
public:
|
5913 |
|
|
M void exceptions(io_state);
|
5914 |
|
|
// remainder unchanged
|
5915 |
|
|
};
|
5916 |
|
|
template >
|
5917 |
|
|
class basic_streambuf {
|
5918 |
|
|
public:
|
5919 |
|
|
M pos_type pubseekoff(off_type off, ios_base::seek_dir way,
|
5920 |
|
|
ios_base::open_mode which = ios_base::in | ios_base::out);
|
5921 |
|
|
M pos_type pubseekpos(pos_type sp,
|
5922 |
|
|
ios_base::open_mode which = ios_base::in | ios_base::out);
|
5923 |
|
|
// remainder unchanged
|
5924 |
|
|
};
|
5925 |
|
|
template >
|
5926 |
|
|
class basic_filebuf : public basic_streambuf {
|
5927 |
|
|
public:
|
5928 |
|
|
M basic_filebuf* open
|
5929 |
|
|
(const char* s, ios_base::open_mode mode);
|
5930 |
|
|
// remainder unchanged
|
5931 |
|
|
};
|
5932 |
|
|
template >
|
5933 |
|
|
class basic_ifstream : public basic_istream {
|
5934 |
|
|
public:
|
5935 |
|
|
M void open(const char* s, ios_base::open_mode mode = in);
|
5936 |
|
|
// remainder unchanged
|
5937 |
|
|
};
|
5938 |
|
|
template >
|
5939 |
|
|
class basic_ofstream : public basic_ostream {
|
5940 |
|
|
public:
|
5941 |
|
|
M void open(const char* s, ios_base::open_mode mode = out | trunc);
|
5942 |
|
|
// remainder unchanged
|
5943 |
|
|
};
|
5944 |
|
|
}
|
5945 |
|
|
|
5946 |
|
|
|
5947 |
|
|
|
5948 |
|
|
1.7.1 Class strstreambuf [depr.strstreambuf]
|
5949 |
|
|
|
5950 |
|
|
[Note: It should be possible to adopt these components with only
|
5951 |
|
|
minor changes from the 2.8 version of the library.]
|
5952 |
|
|
|
5953 |
|
|
M class strstreambuf : public basic_streambuf {
|
5954 |
|
|
public:
|
5955 |
|
|
M explicit strstreambuf(streamsize alsize_arg = 0);
|
5956 |
|
|
M strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
|
5957 |
|
|
M strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0);
|
5958 |
|
|
M strstreambuf(const char* gnext_arg, streamsize n);
|
5959 |
|
|
M strstreambuf(signed char* gnext_arg, streamsize n,
|
5960 |
|
|
signed char* pbeg_arg = 0);
|
5961 |
|
|
M strstreambuf(const signed char* gnext_arg, streamsize n);
|
5962 |
|
|
M strstreambuf(unsigned char* gnext_arg, streamsize n,
|
5963 |
|
|
unsigned char* pbeg_arg = 0);
|
5964 |
|
|
M strstreambuf(const unsigned char* gnext_arg, streamsize n);
|
5965 |
|
|
M virtual ~strstreambuf();
|
5966 |
|
|
M void freeze(bool freezefl = true);
|
5967 |
|
|
M char* str();
|
5968 |
|
|
M int pcount();
|
5969 |
|
|
protected:
|
5970 |
|
|
M virtual int_type overflow (int_type c = EOF);
|
5971 |
|
|
M virtual int_type pbackfail(int_type c = EOF);
|
5972 |
|
|
M virtual int_type underflow();
|
5973 |
|
|
M virtual pos_type seekoff(off_type off, ios_base::seekdir way,
|
5974 |
|
|
ios_base::openmode which
|
5975 |
|
|
= ios_base::in | ios_base::out);
|
5976 |
|
|
M virtual pos_type seekpos(pos_type sp, ios_base::openmode which
|
5977 |
|
|
= ios_base::in | ios_base::out);
|
5978 |
|
|
M virtual streambuf* setbuf(char* s, streamsize n);
|
5979 |
|
|
}
|
5980 |
|
|
|
5981 |
|
|
1.7.4 Class strstream [depr.strstream]
|
5982 |
|
|
|
5983 |
|
|
M class strstream
|
5984 |
|
|
: public basic_iostream {
|
5985 |
|
|
public:
|
5986 |
|
|
// Types
|
5987 |
|
|
M typedef char char_type;
|
5988 |
|
|
M typedef typename char_traits::int_type int_type
|
5989 |
|
|
M typedef typename char_traits::pos_type pos_type;
|
5990 |
|
|
M typedef typename char_traits::off_type off_type;
|
5991 |
|
|
// consturctors/destructor
|
5992 |
|
|
M strstream();
|
5993 |
|
|
M strstream(char* s, int n,
|
5994 |
|
|
ios_base::openmode mode = ios_base::in|ios_base::out);
|
5995 |
|
|
M virtual ~strstream();
|
5996 |
|
|
// Members:
|
5997 |
|
|
M strstreambuf* rdbuf() const;
|
5998 |
|
|
M void freeze(bool freezefl = true);
|
5999 |
|
|
M int pcount() const;
|
6000 |
|
|
M char* str();
|
6001 |
|
|
};
|
6002 |
|
|
|