]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/unordered/doc/ref.php
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / unordered / doc / ref.php
CommitLineData
7c673cae
FG
1<?php
2
3function echo_unordered_docs(
4 $map,
5 $equivalent_keys)
6{
7 $name = 'unordered_'.
8 ($equivalent_keys ? 'multi' : '').
9 ($map ? 'map' : 'set');
10
11 if ($map)
12 {
13 $template_value = <<<EOL
14 <template-type-parameter name="Key">
15 </template-type-parameter>
16 <template-type-parameter name="Mapped">
17 </template-type-parameter>
18
19EOL;
20
21 $key_type = 'Key';
22 $key_name = 'key';
23 $value_type = 'std::pair&lt;Key const, Mapped&gt;';
24 $full_type = $name.'&lt;Key, Mapped, Hash, Pred, Alloc&gt;';
25 }
26 else
27 {
28 $template_value = <<<EOL
29 <template-type-parameter name="Value">
30 </template-type-parameter>
31
32EOL;
33
34 $key_type = 'Value';
35 $key_name = 'value';
36 $value_type = 'Value';
37 $full_type = $name.'&lt;Value, Hash, Pred, Alloc&gt;';
38 }
39?>
40 <class name="<?php echo $name ?>">
41 <template>
42<?php echo $template_value; ?>
43 <template-type-parameter name="Hash">
44 <default><type>boost::hash&lt;<?php echo $key_type; ?>&gt;</type></default>
45 </template-type-parameter>
46 <template-type-parameter name="Pred">
47 <default><type>std::equal_to&lt;<?php echo $key_type; ?>&gt;</type></default>
48 </template-type-parameter>
49 <template-type-parameter name="Alloc">
50 <default><type>std::allocator&lt;<?php echo $value_type; ?>&gt;</type></default>
51 </template-type-parameter>
52 </template>
53 <purpose><simpara>
54 An unordered associative container that <?php
55 echo $map ? 'associates ' : 'stores ';
56 echo $equivalent_keys ? '' : 'unique ';
57 echo $map ? 'keys with another value.' : 'values.';
58 echo $equivalent_keys ? ' The same key can be stored multiple times.' : '';
59 ?>
60
61 </simpara></purpose>
62 <description>
63 <para><emphasis role="bold">Template Parameters</emphasis>
64 <informaltable>
65 <tgroup cols="2">
66 <tbody>
67<?php if ($map): ?>
68 <row>
69 <entry><emphasis>Key</emphasis></entry>
70 <entry><code>Key</code> must be <code>Erasable</code> from the container
71 (i.e. <code>allocator_traits</code> can <code>destroy</code> it).
72 </entry></row>
73 <row>
74 <entry><emphasis>Mapped</emphasis></entry>
75 <entry><code>Mapped</code> must be <code>Erasable</code> from the container
76 (i.e. <code>allocator_traits</code> can <code>destroy</code> it).
77 </entry></row>
78<?php else: ?>
79 <row>
80 <entry><emphasis>Value</emphasis></entry>
81 <entry><code>Value</code> must be <code>Erasable</code> from the container
82 (i.e. <code>allocator_traits</code> can <code>destroy</code> it).
83 </entry></row>
84<?php endif ?>
85 <row>
86 <entry><emphasis>Hash</emphasis></entry>
87 <entry>A unary function object type that acts a hash function for a <code><?php echo $key_type; ?></code>. It takes a single argument of type <code><?php echo $key_type; ?></code> and returns a value of type std::size_t.</entry></row>
88 <row>
89 <entry><emphasis>Pred</emphasis></entry>
90 <entry>A binary function object that implements an equivalence relation on values of type <code><?php echo $key_type; ?></code>.
91 A binary function object that induces an equivalence relation on values of type <code><?php echo $key_type; ?></code>.
92 It takes two arguments of type <code><?php echo $key_type; ?></code> and returns a value of type bool.</entry></row>
93 <row>
94 <entry><emphasis>Alloc</emphasis></entry>
95 <entry>An allocator whose value type is the same as the container's value type.</entry></row></tbody></tgroup></informaltable></para>
96 <para>The elements are organized into buckets. <?php
97 echo $equivalent_keys ?
98 'Keys with the same hash code are stored in the same bucket and elements with equivalent keys are stored next to each other.' :
99 'Keys with the same hash code are stored in the same bucket.';
100 ?></para>
101 <para>The number of buckets can be automatically increased by a call to insert, or as the result of calling rehash.</para>
102 </description>
103 <typedef name="key_type">
104 <type><?php echo $key_type; ?></type>
105 </typedef>
106 <typedef name="value_type">
107 <type><?php echo $value_type; ?></type>
108 </typedef>
109<?php if ($map): ?>
110 <typedef name="mapped_type">
111 <type>Mapped</type>
112 </typedef>
113<?php endif; ?>
114 <typedef name="hasher">
115 <type>Hash</type>
116 </typedef>
117 <typedef name="key_equal">
118 <type>Pred</type>
119 </typedef>
120 <typedef name="allocator_type">
121 <type>Alloc</type>
122 </typedef>
123 <typedef name="pointer">
124 <type>typename allocator_type::pointer</type>
125 <description>
126 <para>
127 <code>value_type*</code> if
128 <code>allocator_type::pointer</code> is not defined.
129 </para>
130 </description>
131 </typedef>
132 <typedef name="const_pointer">
133 <type>typename allocator_type::const_pointer</type>
134 <description>
135 <para>
136 <code>boost::pointer_to_other&lt;pointer, value_type&gt;::type</code>
137 if <code>allocator_type::const_pointer</code> is not defined.
138 </para>
139 </description>
140 </typedef>
141 <typedef name="reference">
142 <type>value_type&amp;</type>
143 <purpose><simpara>lvalue of <type>value_type</type>.</simpara></purpose>
144 </typedef>
145 <typedef name="const_reference">
146 <type>value_type const&amp;</type>
147 <purpose><simpara>const lvalue of <type>value_type</type>.</simpara></purpose>
148 </typedef>
149 <typedef name="size_type">
150 <type><emphasis>implementation-defined</emphasis></type>
151 <description>
152 <para>An unsigned integral type.</para>
153 <para><type>size_type</type> can represent any non-negative value of <type>difference_type</type>.</para>
154 </description>
155 </typedef>
156 <typedef name="difference_type">
157 <type><emphasis>implementation-defined</emphasis></type>
158 <description>
159 <para>A signed integral type.</para>
160 <para>Is identical to the difference type of <type>iterator</type> and <type>const_iterator</type>.</para>
161 </description>
162 </typedef>
163 <typedef name="iterator">
164 <type><emphasis>implementation-defined</emphasis></type>
165 <description>
166 <para><?php echo $map ? 'An' : 'A constant' ?> iterator whose value type is <type>value_type</type>. </para>
167 <para>The iterator category is at least a forward iterator.</para>
168 <para>Convertible to <type>const_iterator</type>.</para>
169 </description>
170 </typedef>
171 <typedef name="const_iterator">
172 <type><emphasis>implementation-defined</emphasis></type>
173 <description>
174 <para>A constant iterator whose value type is <type>value_type</type>. </para>
175 <para>The iterator category is at least a forward iterator.</para>
176 </description>
177 </typedef>
178 <typedef name="local_iterator">
179 <type><emphasis>implementation-defined</emphasis></type>
180 <description>
181 <para>An iterator with the same value type, difference type and pointer and reference type as <type>iterator</type>.</para>
182 <para>A local_iterator object can be used to iterate through a single bucket.</para>
183 </description>
184 </typedef>
185 <typedef name="const_local_iterator">
186 <type><emphasis>implementation-defined</emphasis></type>
187 <description>
188 <para>A constant iterator with the same value type, difference type and pointer and reference type as <type>const_iterator</type>.</para>
189 <para>A const_local_iterator object can be used to iterate through a single bucket.</para>
190 </description>
191 </typedef>
192 <constructor>
193 <postconditions>
194 <code><methodname>size</methodname>() == 0</code>
195 </postconditions>
196 <description>
197 <para>Constructs an empty container using hasher() as the hash function, key_equal() as the key equality predicate, allocator_type() as the allocator and a maximum load factor of 1.0.</para>
198 </description>
199 <requires>
200 <para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
201 <code>allocator_type</code> need to be <code>DefaultConstructible</code>.
202 </para>
203 </requires>
204 </constructor>
205 <constructor specifiers="explicit">
206 <parameter name="n">
207 <paramtype>size_type</paramtype>
208 </parameter>
209 <parameter name="hf">
210 <paramtype>hasher const&amp;</paramtype>
211 <default>hasher()</default>
212 </parameter>
213 <parameter name="eq">
214 <paramtype>key_equal const&amp;</paramtype>
215 <default>key_equal()</default>
216 </parameter>
217 <parameter name="a">
218 <paramtype>allocator_type const&amp;</paramtype>
219 <default>allocator_type()</default>
220 </parameter>
221 <postconditions>
222 <code><methodname>size</methodname>() == 0</code>
223 </postconditions>
224 <description>
225 <para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.</para>
226 </description>
227 <requires>
228 <para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
229 <code>allocator_type</code> need to be <code>DefaultConstructible</code>.
230 </para>
231 </requires>
232 </constructor>
233 <constructor>
234 <template>
235 <template-type-parameter name="InputIterator">
236 </template-type-parameter>
237 </template>
238 <parameter name="f">
239 <paramtype>InputIterator</paramtype>
240 </parameter>
241 <parameter name="l">
242 <paramtype>InputIterator</paramtype>
243 </parameter>
244 <parameter name="n">
245 <paramtype>size_type</paramtype>
246 <default><emphasis>implementation-defined</emphasis></default>
247 </parameter>
248 <parameter name="hf">
249 <paramtype>hasher const&amp;</paramtype>
250 <default>hasher()</default>
251 </parameter>
252 <parameter name="eq">
253 <paramtype>key_equal const&amp;</paramtype>
254 <default>key_equal()</default>
255 </parameter>
256 <parameter name="a">
257 <paramtype>allocator_type const&amp;</paramtype>
258 <default>allocator_type()</default>
259 </parameter>
260 <description>
261 <para>Constructs an empty container with at least <code>n</code> buckets,
262 using <code>hf</code> as the hash function,
263 <code>eq</code> as the key equality predicate,
264 <code>a</code> as the allocator and a maximum load factor of 1.0
265 and inserts the elements from [f, l) into it.
266 </para>
267 </description>
268 <requires>
269 <para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
270 <code>allocator_type</code> need to be <code>DefaultConstructible</code>.
271 </para>
272 </requires>
273 </constructor>
274 <constructor>
275 <parameter>
276 <paramtype><?php echo $name; ?> const&amp;</paramtype>
277 </parameter>
278 <description>
279 <para>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</para>
280 <para>If <code>Allocator::select_on_container_copy_construction</code>
281 exists and has the right signature, the allocator will be
282 constructed from its result.</para>
283 </description>
284 <requires>
285 <para><code>value_type</code> is copy constructible</para>
286 </requires>
287 </constructor>
288 <constructor>
289 <parameter>
290 <paramtype><?php echo $name; ?> &amp;&amp;</paramtype>
291 </parameter>
292 <description>
293 <para>The move constructor.</para>
294 </description>
295 <notes>
296 <para>This is implemented using Boost.Move.</para>
297 </notes>
298 <requires>
299 <para>
300 <code>value_type</code> is move constructible.
301 </para>
302 <para>
303 On compilers without rvalue reference support the
304 emulation does not support moving without calling
305 <code>boost::move</code> if <code>value_type</code> is
306 not copyable. So, for example, you can't return the
307 container from a function.
308 </para>
309 </requires>
310 </constructor>
311 <constructor specifiers="explicit">
312 <parameter name="a">
313 <paramtype>Allocator const&amp;</paramtype>
314 </parameter>
315 <description>
316 <para>Constructs an empty container, using allocator <code>a</code>.</para>
317 </description>
318 </constructor>
319 <constructor>
320 <parameter name="x">
321 <paramtype><?php echo $name; ?> const&amp;</paramtype>
322 </parameter>
323 <parameter name="a">
324 <paramtype>Allocator const&amp;</paramtype>
325 </parameter>
326 <description>
327 <para>Constructs an container, copying <code>x</code>'s contained elements, hash function, predicate, maximum load factor, but using allocator <code>a</code>.</para>
328 </description>
329 </constructor>
330 <constructor>
331 <parameter name="x">
332 <paramtype><?php echo $name; ?> &amp;&amp;</paramtype>
333 </parameter>
334 <parameter name="a">
335 <paramtype>Allocator const&amp;</paramtype>
336 </parameter>
337 <description>
338 <para>Construct a container moving <code>x</code>'s contained elements, and having the hash function, predicate and maximum load factor, but using allocate <code>a</code>.</para>
339 </description>
340 <notes>
341 <para>This is implemented using Boost.Move.</para>
342 </notes>
343 <requires>
344 <para>
345 <code>value_type</code> is move insertable.
346 </para>
347 </requires>
348 </constructor>
349 <constructor>
350 <parameter name="il">
351 <paramtype>initializer_list&lt;value_type&gt;</paramtype>
352 </parameter>
353 <parameter name="n">
354 <paramtype>size_type</paramtype>
355 <default><emphasis>implementation-defined</emphasis></default>
356 </parameter>
357 <parameter name="hf">
358 <paramtype>hasher const&amp;</paramtype>
359 <default>hasher()</default>
360 </parameter>
361 <parameter name="eq">
362 <paramtype>key_equal const&amp;</paramtype>
363 <default>key_equal()</default>
364 </parameter>
365 <parameter name="a">
366 <paramtype>allocator_type const&amp;</paramtype>
367 <default>allocator_type()</default>
368 </parameter>
369 <description>
370 <para>Constructs an empty container with at least <code>n</code> buckets,
371 using <code>hf</code> as the hash function,
372 <code>eq</code> as the key equality predicate,
373 <code>a</code> as the allocator and a maximum load factor of 1.0
374 and inserts the elements from <code>il</code> into it.
375 </para>
376 </description>
377 <requires>
378 <para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
379 <code>allocator_type</code> need to be <code>DefaultConstructible</code>.
380 </para>
381 </requires>
382 </constructor>
383 <constructor>
384 <parameter name="n">
385 <paramtype>size_type</paramtype>
386 </parameter>
387 <parameter name="a">
388 <paramtype>allocator_type const&amp;</paramtype>
389 </parameter>
390 <postconditions>
391 <code><methodname>size</methodname>() == 0</code>
392 </postconditions>
393 <description>
394 <para>Constructs an empty container with at least <code>n</code> buckets,
395 using <code>hf</code> as the hash function,
396 the default hash function and key equality predicate,
397 <code>a</code> as the allocator and a maximum load factor of 1.0.</para>
398 </description>
399 <requires>
400 <para><code>hasher</code> and <code>key_equal</code> need to be <code>DefaultConstructible</code>.
401 </para>
402 </requires>
403 </constructor>
404 <constructor>
405 <parameter name="n">
406 <paramtype>size_type</paramtype>
407 </parameter>
408 <parameter name="hf">
409 <paramtype>hasher const&amp;</paramtype>
410 </parameter>
411 <parameter name="a">
412 <paramtype>allocator_type const&amp;</paramtype>
413 </parameter>
414 <postconditions>
415 <code><methodname>size</methodname>() == 0</code>
416 </postconditions>
417 <description>
418 <para>Constructs an empty container with at least <code>n</code> buckets,
419 using <code>hf</code> as the hash function,
420 the default key equality predicate,
421 <code>a</code> as the allocator and a maximum load factor of 1.0.</para>
422 </description>
423 <requires>
424 <para><code>key_equal</code> needs to be <code>DefaultConstructible</code>.
425 </para>
426 </requires>
427 </constructor>
428 <constructor>
429 <template>
430 <template-type-parameter name="InputIterator">
431 </template-type-parameter>
432 </template>
433 <parameter name="f">
434 <paramtype>InputIterator</paramtype>
435 </parameter>
436 <parameter name="l">
437 <paramtype>InputIterator</paramtype>
438 </parameter>
439 <parameter name="n">
440 <paramtype>size_type</paramtype>
441 </parameter>
442 <parameter name="a">
443 <paramtype>allocator_type const&amp;</paramtype>
444 </parameter>
445 <description>
446 <para>Constructs an empty container with at least <code>n</code> buckets,
447 using <code>a</code> as the allocator, with the
448 default hash function and key equality predicate
449 and a maximum load factor of 1.0
450 and inserts the elements from [f, l) into it.
451 </para>
452 </description>
453 <requires>
454 <para><code>hasher</code>, <code>key_equal</code> need to be <code>DefaultConstructible</code>.
455 </para>
456 </requires>
457 </constructor>
458 <constructor>
459 <template>
460 <template-type-parameter name="InputIterator">
461 </template-type-parameter>
462 </template>
463 <parameter name="f">
464 <paramtype>InputIterator</paramtype>
465 </parameter>
466 <parameter name="l">
467 <paramtype>InputIterator</paramtype>
468 </parameter>
469 <parameter name="n">
470 <paramtype>size_type</paramtype>
471 </parameter>
472 <parameter name="hf">
473 <paramtype>hasher const&amp;</paramtype>
474 </parameter>
475 <parameter name="a">
476 <paramtype>allocator_type const&amp;</paramtype>
477 </parameter>
478 <description>
479 <para>Constructs an empty container with at least <code>n</code> buckets,
480 using <code>hf</code> as the hash function,
481 <code>a</code> as the allocator, with the
482 default key equality predicate
483 and a maximum load factor of 1.0
484 and inserts the elements from [f, l) into it.
485 </para>
486 </description>
487 <requires>
488 <para><code>key_equal</code> needs to be <code>DefaultConstructible</code>.
489 </para>
490 </requires>
491 </constructor>
492 <destructor>
493 <notes>
494 <para>The destructor is applied to every element, and all memory is deallocated</para>
495 </notes>
496 </destructor>
497 <method name="operator=">
498 <parameter>
499 <paramtype><?php echo $name; ?> const&amp;</paramtype>
500 </parameter>
501 <type><?php echo $name; ?>&amp;</type>
502 <description>
503 <para>The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.</para>
504 <para>If <code>Alloc::propagate_on_container_copy_assignment</code>
505 exists and <code>Alloc::propagate_on_container_copy_assignment::value
506 </code> is true, the allocator is overwritten, if not the
507 copied elements are created using the existing
508 allocator.</para>
509 </description>
510 <requires>
511 <para><code>value_type</code> is copy constructible</para>
512 </requires>
513 </method>
514 <method name="operator=">
515 <parameter>
516 <paramtype><?php echo $name; ?> &amp;&amp;</paramtype>
517 </parameter>
518 <type><?php echo $name; ?>&amp;</type>
519 <description>
520 <para>The move assignment operator.</para>
521 <para>If <code>Alloc::propagate_on_container_move_assignment</code>
522 exists and <code>Alloc::propagate_on_container_move_assignment::value
523 </code> is true, the allocator is overwritten, if not the
524 moved elements are created using the existing
525 allocator.</para>
526 </description>
527 <notes>
528 <para>
529 On compilers without rvalue references, this is emulated using
530 Boost.Move. Note that on some compilers the copy assignment
531 operator may be used in some circumstances.
532 </para>
533 </notes>
534 <requires>
535 <para>
536 <code>value_type</code> is move constructible.
537 </para>
538 </requires>
539 </method>
540 <method name="operator=">
541 <parameter>
542 <paramtype>initializer_list&lt;value_type&gt;</paramtype>
543 </parameter>
544 <type><?php echo $name; ?>&amp;</type>
545 <description>
546 <para>Assign from values in initializer list. All existing elements are either overwritten by the new elements or destroyed.</para>
547 </description>
548 <requires>
549 <para>
550 <code>value_type</code> is <code>CopyInsertable</code> into the container and
551 <code>CopyAssignable</code>.
552 </para>
553 </requires>
554 </method>
555 <method name="get_allocator" cv="const">
556 <type>allocator_type</type>
557 </method>
558 <method-group name="size and capacity">
559 <method name="empty" cv="const">
560 <type>bool</type>
561 <returns>
562 <code><methodname>size</methodname>() == 0</code>
563 </returns>
564 </method>
565 <method name="size" cv="const">
566 <type>size_type</type>
567 <returns>
568 <code>std::distance(<methodname>begin</methodname>(), <methodname>end</methodname>())</code>
569 </returns>
570 </method>
571 <method name="max_size" cv="const">
572 <type>size_type</type>
573 <returns><code><methodname>size</methodname>()</code> of the largest possible container.
574 </returns>
575 </method>
576 </method-group>
577 <method-group name="iterators">
578 <overloaded-method name="begin">
579 <signature><type>iterator</type></signature>
580 <signature cv="const"><type>const_iterator</type></signature>
581 <returns>An iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
582 </returns>
583 </overloaded-method>
584 <overloaded-method name="end">
585 <signature>
586 <type>iterator</type>
587 </signature>
588 <signature cv="const">
589 <type>const_iterator</type>
590 </signature>
591 <returns>An iterator which refers to the past-the-end value for the container.
592 </returns>
593 </overloaded-method>
594 <method name="cbegin" cv="const">
595 <type>const_iterator</type>
596 <returns>A constant iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
597 </returns>
598 </method>
599 <method name="cend" cv="const">
600 <type>const_iterator</type>
601 <returns>A constant iterator which refers to the past-the-end value for the container.
602 </returns>
603 </method>
604 </method-group>
605 <method-group name="modifiers">
606 <method name="emplace">
607 <template>
608 <template-type-parameter name="Args" pack="1">
609 </template-type-parameter>
610 </template>
611 <parameter name="args" pack="1">
612 <paramtype>Args&amp;&amp;</paramtype>
613 </parameter>
614 <type><?php echo $equivalent_keys ? 'iterator' : 'std::pair&lt;iterator, bool&gt;' ?></type>
615 <description>
616 <para>Inserts an object, constructed with the arguments <code>args</code>, in the container<?php
617 echo $equivalent_keys ? '.' :
618 ' if and only if there is no element in the container with an equivalent '.$key_name. '.';
619 ?></para>
620 </description>
621 <requires>
622 <para><code>value_type</code> is <code>EmplaceConstructible</code> into
623 <code>X</code> from <code>args</code>.
624 </para>
625 </requires>
626 <returns>
627<?php if ($equivalent_keys): ?>
628 <para>An iterator pointing to the inserted element.</para>
629<?php else: ?>
630 <para>The bool component of the return type is true if an insert took place.</para>
631 <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent <?php echo $key_name; ?>.</para>
632<?php endif; ?>
633 </returns>
634 <throws>
635 <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
636 </throws>
637 <notes>
638 <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
639 <para>Pointers and references to elements are never invalidated.</para>
640 <para>If the compiler doesn't support variadic template arguments or rvalue
641 references, this is emulated for up to 10 arguments, with no support
642 for rvalue references or move semantics.</para>
643 <para>Since existing <code>std::pair</code> implementations don't support
644 <code>std::piecewise_construct</code> this emulates it,
645 but using <code>boost::unordered::piecewise_construct</code>.</para>
646 </notes>
647 </method>
648 <method name="emplace_hint">
649 <template>
650 <template-type-parameter name="Args" pack="1">
651 </template-type-parameter>
652 </template>
653 <parameter name="hint">
654 <paramtype>const_iterator</paramtype>
655 </parameter>
656 <parameter name="args" pack="1">
657 <paramtype>Args&amp;&amp;</paramtype>
658 </parameter>
659 <type>iterator</type>
660 <description>
661 <para>Inserts an object, constructed with the arguments <code>args</code>, in the container<?php
662 echo $equivalent_keys ? '.' :
663 ' if and only if there is no element in the container with an equivalent '.$key_name. '.';
664 ?></para>
665 <para><code>hint</code> is a suggestion to where the element should be inserted.</para>
666 </description>
667 <requires>
668 <para><code>value_type</code> is <code>EmplaceConstructible</code> into
669 <code>X</code> from <code>args</code>.
670 </para>
671 </requires>
672 <returns>
673<?php if ($equivalent_keys): ?>
674 <para>An iterator pointing to the inserted element.</para>
675<?php else: ?>
676 <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent <?php echo $key_name; ?>.</para>
677<?php endif; ?>
678 </returns>
679 <throws>
680 <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
681 </throws>
682 <notes>
683 <para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same <?php echo $key_name; ?>. </para>
684 <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
685 <para>Pointers and references to elements are never invalidated.</para>
686 <para>If the compiler doesn't support variadic template arguments or rvalue
687 references, this is emulated for up to 10 arguments, with no support
688 for rvalue references or move semantics.</para>
689 <para>Since existing <code>std::pair</code> implementations don't support
690 <code>std::piecewise_construct</code> this emulates it,
691 but using <code>boost::unordered::piecewise_construct</code>.</para>
692 </notes>
693 </method>
694 <method name="insert">
695 <parameter name="obj">
696 <paramtype>value_type const&amp;</paramtype>
697 </parameter>
698 <type><?php echo $equivalent_keys ? 'iterator' : 'std::pair&lt;iterator, bool&gt;' ?></type>
699 <description>
700 <para>Inserts <code>obj</code> in the container<?php
701 echo $equivalent_keys ? '.' :
702 ' if and only if there is no element in the container with an equivalent '.$key_name. '.';
703 ?></para>
704 </description>
705 <requires>
706 <para><code>value_type</code> is <code>CopyInsertable</code>.</para>
707 </requires>
708 <returns>
709<?php if ($equivalent_keys): ?>
710 <para>An iterator pointing to the inserted element.</para>
711<?php else: ?>
712 <para>The bool component of the return type is true if an insert took place.</para>
713 <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent <?php echo $key_name; ?>.</para>
714<?php endif; ?>
715 </returns>
716 <throws>
717 <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
718 </throws>
719 <notes>
720 <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
721 <para>Pointers and references to elements are never invalidated.</para>
722 </notes>
723 </method>
724 <method name="insert">
725 <parameter name="obj">
726 <paramtype>value_type&amp;&amp;</paramtype>
727 </parameter>
728 <type><?php echo $equivalent_keys ? 'iterator' : 'std::pair&lt;iterator, bool&gt;' ?></type>
729 <description>
730 <para>Inserts <code>obj</code> in the container<?php
731 echo $equivalent_keys ? '.' :
732 ' if and only if there is no element in the container with an equivalent '.$key_name. '.';
733 ?></para>
734 </description>
735 <requires>
736 <para><code>value_type</code> is <code>MoveInsertable</code>.</para>
737 </requires>
738 <returns>
739<?php if ($equivalent_keys): ?>
740 <para>An iterator pointing to the inserted element.</para>
741<?php else: ?>
742 <para>The bool component of the return type is true if an insert took place.</para>
743 <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent <?php echo $key_name; ?>.</para>
744<?php endif; ?>
745 </returns>
746 <throws>
747 <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
748 </throws>
749 <notes>
750 <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
751 <para>Pointers and references to elements are never invalidated.</para>
752 </notes>
753 </method>
754 <method name="insert">
755 <parameter name="hint">
756 <paramtype>const_iterator</paramtype>
757 </parameter>
758 <parameter name="obj">
759 <paramtype>value_type const&amp;</paramtype>
760 </parameter>
761 <type>iterator</type>
762 <description>
763<?php if ($equivalent_keys): ?>
764 <para>Inserts <code>obj</code> in the container.</para>
765<?php else: ?>
766 <para>Inserts <code>obj</code> in the container if and only if there is no element in the container with an equivalent <?php echo $key_name; ?>.</para>
767<?php endif; ?>
768 <para>hint is a suggestion to where the element should be inserted.</para>
769 </description>
770 <requires>
771 <para><code>value_type</code> is <code>CopyInsertable</code>.</para>
772 </requires>
773 <returns>
774<?php if ($equivalent_keys): ?>
775 <para>An iterator pointing to the inserted element.</para>
776<?php else: ?>
777 <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent <?php echo $key_name; ?>.</para>
778<?php endif; ?>
779 </returns>
780 <throws>
781 <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
782 </throws>
783 <notes>
784 <para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same <?php echo $key_name; ?>. </para>
785 <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
786 <para>Pointers and references to elements are never invalidated.</para>
787 </notes>
788 </method>
789 <method name="insert">
790 <parameter name="hint">
791 <paramtype>const_iterator</paramtype>
792 </parameter>
793 <parameter name="obj">
794 <paramtype>value_type&amp;&amp;</paramtype>
795 </parameter>
796 <type>iterator</type>
797 <description>
798<?php if ($equivalent_keys): ?>
799 <para>Inserts <code>obj</code> in the container.</para>
800<?php else: ?>
801 <para>Inserts <code>obj</code> in the container if and only if there is no element in the container with an equivalent <?php echo $key_name; ?>.</para>
802<?php endif; ?>
803 <para>hint is a suggestion to where the element should be inserted.</para>
804 </description>
805 <requires>
806 <para><code>value_type</code> is <code>MoveInsertable</code>.</para>
807 </requires>
808 <returns>
809<?php if ($equivalent_keys): ?>
810 <para>An iterator pointing to the inserted element.</para>
811<?php else: ?>
812 <para>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent <?php echo $key_name; ?>.</para>
813<?php endif; ?>
814 </returns>
815 <throws>
816 <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
817 </throws>
818 <notes>
819 <para>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same <?php echo $key_name; ?>. </para>
820 <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
821 <para>Pointers and references to elements are never invalidated.</para>
822 </notes>
823 </method>
824 <method name="insert">
825 <template>
826 <template-type-parameter name="InputIterator">
827 </template-type-parameter>
828 </template>
829 <parameter name="first">
830 <paramtype>InputIterator</paramtype>
831 </parameter>
832 <parameter name="last">
833 <paramtype>InputIterator</paramtype>
834 </parameter>
835 <type>void</type>
836 <description>
837 <para>Inserts a range of elements into the container.
838<?php if (!$equivalent_keys): ?>
839 Elements are inserted if and only if there is no element in the container with an equivalent <?php echo $key_name; ?>.
840<?php endif; ?>
841 </para>
842 </description>
843 <requires>
844 <para><code>value_type</code> is <code>EmplaceConstructible</code> into
845 <code>X</code> from <code>*first</code>.</para>
846 </requires>
847 <throws>
848 <para>When inserting a single element, if an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
849 </throws>
850 <notes>
851 <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
852 <para>Pointers and references to elements are never invalidated.</para>
853 </notes>
854 </method>
855 <method name="insert">
856 <parameter name="il">
857 <paramtype>initializer_list&lt;value_type&gt;</paramtype>
858 </parameter>
859 <type>void</type>
860 <description>
861 <para>Inserts a range of elements into the container.
862 <?php if (!$equivalent_keys): ?>
863 Elements are inserted if and only if there is no element in the container with an equivalent <?php echo $key_name; ?>.
864 <?php endif; ?>
865 </para>
866 </description>
867 <requires>
868 <para><code>value_type</code> is <code>EmplaceConstructible</code> into
869 <code>X</code> from <code>*first</code>.</para>
870 </requires>
871 <throws>
872 <para>When inserting a single element, if an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
873 </throws>
874 <notes>
875 <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
876 <para>Pointers and references to elements are never invalidated.</para>
877 </notes>
878 </method>
879 <method name="erase">
880 <parameter name="position">
881 <paramtype>const_iterator</paramtype>
882 </parameter>
883 <type>iterator</type>
884 <description>
885 <para>Erase the element pointed to by <code>position</code>.</para>
886 </description>
887 <returns>
888 <para>The iterator following <code>position</code> before the erasure.</para>
889 </returns>
890 <throws>
891 <para>Only throws an exception if it is thrown by <code>hasher</code> or <code>key_equal</code>.</para>
892 </throws>
893 <notes>
894 <para>
895 In older versions this could be inefficient because it had to search
896 through several buckets to find the position of the returned iterator.
897 The data structure has been changed so that this is no longer the case,
898 and the alternative erase methods have been deprecated.
899 </para>
900 </notes>
901 </method>
902 <method name="erase">
903 <parameter name="k">
904 <paramtype>key_type const&amp;</paramtype>
905 </parameter>
906 <type>size_type</type>
907 <description>
908 <para>Erase all elements with key equivalent to <code>k</code>.</para>
909 </description>
910 <returns>
911 <para>The number of elements erased.</para>
912 </returns>
913 <throws>
914 <para>Only throws an exception if it is thrown by <code>hasher</code> or <code>key_equal</code>.</para>
915 </throws>
916 </method>
917 <method name="erase">
918 <parameter name="first">
919 <paramtype>const_iterator</paramtype>
920 </parameter>
921 <parameter name="last">
922 <paramtype>const_iterator</paramtype>
923 </parameter>
924 <type>iterator</type>
925 <description>
926 <para>Erases the elements in the range from <code>first</code> to <code>last</code>.</para>
927 </description>
928 <returns>
929 <para>The iterator following the erased elements - i.e. <code>last</code>.</para>
930 </returns>
931 <throws>
932 <para>Only throws an exception if it is thrown by <code>hasher</code> or <code>key_equal</code>.</para>
933 <para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para>
934 </throws>
935 </method>
936 <method name="quick_erase">
937 <parameter name="position">
938 <paramtype>const_iterator</paramtype>
939 </parameter>
940 <type>void</type>
941 <description>
942 <para>Erase the element pointed to by <code>position</code>.</para>
943 </description>
944 <throws>
945 <para>Only throws an exception if it is thrown by <code>hasher</code> or <code>key_equal</code>.</para>
946 <para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para>
947 </throws>
948 <notes>
949 <para>
950 This method was implemented because returning an iterator to
951 the next element from <code>erase</code> was expensive, but
952 the container has been redesigned so that is no longer the
953 case. So this method is now deprecated.
954 </para>
955 </notes>
956 </method>
957 <method name="erase_return_void">
958 <parameter name="position">
959 <paramtype>const_iterator</paramtype>
960 </parameter>
961 <type>void</type>
962 <description>
963 <para>Erase the element pointed to by <code>position</code>.</para>
964 </description>
965 <throws>
966 <para>Only throws an exception if it is thrown by <code>hasher</code> or <code>key_equal</code>.</para>
967 <para>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</para>
968 </throws>
969 <notes>
970 <para>
971 This method was implemented because returning an iterator to
972 the next element from <code>erase</code> was expensive, but
973 the container has been redesigned so that is no longer the
974 case. So this method is now deprecated.
975 </para>
976 </notes>
977 </method>
978 <method name="clear">
979 <type>void</type>
980 <description>
981 <para>Erases all elements in the container.</para>
982 </description>
983 <postconditions>
984 <para><code><methodname>size</methodname>() == 0</code></para>
985 </postconditions>
986 <throws>
987 <para>Never throws an exception.</para>
988 </throws>
989 </method>
990 <method name="swap">
991 <parameter>
992 <paramtype><?php echo $name; ?>&amp;</paramtype>
993 </parameter>
994 <type>void</type>
995 <description>
996 <para>Swaps the contents of the container with the parameter.</para>
997 <para>If <code>Allocator::propagate_on_container_swap</code> is declared and
998 <code>Allocator::propagate_on_container_swap::value</code> is true then the
999 containers' allocators are swapped. Otherwise, swapping with unequal allocators
1000 results in undefined behavior.</para>
1001 </description>
1002 <throws>
1003 <para>Doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of <code>key_equal</code> or <code>hasher</code>.</para>
1004 </throws>
1005 <notes>
1006 <para>The exception specifications aren't quite the same as the C++11 standard, as
1007 the equality predieate and hash function are swapped using their copy constructors.</para>
1008 </notes>
1009 </method>
1010 </method-group>
1011 <method-group name="observers">
1012 <method name="hash_function" cv="const">
1013 <type>hasher</type>
1014 <returns>The container's hash function.
1015 </returns>
1016 </method>
1017 <method name="key_eq" cv="const">
1018 <type>key_equal</type>
1019 <returns>The container's key equality predicate.
1020 </returns>
1021 </method>
1022 </method-group>
1023 <method-group name="lookup">
1024 <overloaded-method name="find">
1025 <signature>
1026 <parameter name="k">
1027 <paramtype>key_type const&amp;</paramtype>
1028 </parameter>
1029 <type>iterator</type>
1030 </signature>
1031 <signature cv="const">
1032 <parameter name="k">
1033 <paramtype>key_type const&amp;</paramtype>
1034 </parameter>
1035 <type>const_iterator</type>
1036 </signature>
1037 <signature>
1038 <template>
1039 <template-type-parameter name="CompatibleKey"/>
1040 <template-type-parameter name="CompatibleHash"/>
1041 <template-type-parameter name="CompatiblePredicate"/>
1042 </template>
1043 <parameter name="k">
1044 <paramtype>CompatibleKey const&amp;</paramtype>
1045 </parameter>
1046 <parameter name="hash">
1047 <paramtype>CompatibleHash const&amp;</paramtype>
1048 </parameter>
1049 <parameter name="eq">
1050 <paramtype>CompatiblePredicate const&amp;</paramtype>
1051 </parameter>
1052 <type>iterator</type>
1053 </signature>
1054 <signature cv="const">
1055 <template>
1056 <template-type-parameter name="CompatibleKey"/>
1057 <template-type-parameter name="CompatibleHash"/>
1058 <template-type-parameter name="CompatiblePredicate"/>
1059 </template>
1060 <parameter name="k">
1061 <paramtype>CompatibleKey const&amp;</paramtype>
1062 </parameter>
1063 <parameter name="hash">
1064 <paramtype>CompatibleHash const&amp;</paramtype>
1065 </parameter>
1066 <parameter name="eq">
1067 <paramtype>CompatiblePredicate const&amp;</paramtype>
1068 </parameter>
1069 <type>const_iterator</type>
1070 </signature>
1071 <returns>
1072 <para>An iterator pointing to an element with key equivalent to <code>k</code>, or <code>b.end()</code> if no such element exists.</para>
1073 </returns>
1074 <notes><para>
1075 The templated overloads are a non-standard extensions which
1076 allows you to use a compatible hash function and equality
1077 predicate for a key of a different type in order to avoid
1078 an expensive type cast. In general, its use is not encouraged.
1079 </para></notes>
1080 </overloaded-method>
1081 <method name="count" cv="const">
1082 <parameter name="k">
1083 <paramtype>key_type const&amp;</paramtype>
1084 </parameter>
1085 <type>size_type</type>
1086 <returns>
1087 <para>The number of elements with key equivalent to <code>k</code>.</para>
1088 </returns>
1089 </method>
1090 <overloaded-method name="equal_range">
1091 <signature>
1092 <parameter name="k">
1093 <paramtype>key_type const&amp;</paramtype>
1094 </parameter>
1095 <type>std::pair&lt;iterator, iterator&gt;</type>
1096 </signature>
1097 <signature cv="const">
1098 <parameter name="k">
1099 <paramtype>key_type const&amp;</paramtype>
1100 </parameter>
1101 <type>std::pair&lt;const_iterator, const_iterator&gt;</type>
1102 </signature>
1103 <returns>
1104 <para>A range containing all elements with key equivalent to <code>k</code>.
1105 If the container doesn't container any such elements, returns
1106 <code><functionname>std::make_pair</functionname>(<methodname>b.end</methodname>(),<methodname>b.end</methodname>())</code>.
1107 </para>
1108 </returns>
1109 </overloaded-method>
1110<?php if ($map && !$equivalent_keys): ?>
1111 <method name="operator[]">
1112 <parameter name="k">
1113 <paramtype>key_type const&amp;</paramtype>
1114 </parameter>
1115 <type>mapped_type&amp;</type>
1116 <effects>
1117 <para>If the container does not already contain an elements with a key equivalent to <code>k</code>, inserts the value <code>std::pair&lt;key_type const, mapped_type&gt;(k, mapped_type())</code></para>
1118 </effects>
1119 <returns>
1120 <para>A reference to <code>x.second</code> where x is the element already in the container, or the newly inserted element with a key equivalent to <code>k</code></para>
1121 </returns>
1122 <throws>
1123 <para>If an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
1124 </throws>
1125 <notes>
1126 <para>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</para>
1127 <para>Pointers and references to elements are never invalidated.</para>
1128 </notes>
1129 </method>
1130 <overloaded-method name="at">
1131 <signature><type>Mapped&amp;</type>
1132 <parameter name="k"><paramtype>key_type const&amp;</paramtype></parameter></signature>
1133 <signature cv="const"><type>Mapped const&amp;</type>
1134 <parameter name="k"><paramtype>key_type const&amp;</paramtype></parameter></signature>
1135 <returns>
1136 <para>A reference to <code>x.second</code> where <code>x</code> is the (unique) element whose key is equivalent to <code>k</code>.</para>
1137 </returns>
1138 <throws>
1139 <para>An exception object of type <code>std::out_of_range</code> if no such element is present.</para>
1140 </throws>
1141 </overloaded-method>
1142<?php endif; ?>
1143 </method-group>
1144 <method-group name="bucket interface">
1145 <method name="bucket_count" cv="const">
1146 <type>size_type</type>
1147 <returns>
1148 <para>The number of buckets.</para>
1149 </returns>
1150 </method>
1151 <method name="max_bucket_count" cv="const">
1152 <type>size_type</type>
1153 <returns>
1154 <para>An upper bound on the number of buckets.</para>
1155 </returns>
1156 </method>
1157 <method name="bucket_size" cv="const">
1158 <parameter name="n">
1159 <paramtype>size_type</paramtype>
1160 </parameter>
1161 <type>size_type</type>
1162 <requires>
1163 <para><code>n &lt; <methodname>bucket_count</methodname>()</code></para>
1164 </requires>
1165 <returns>
1166 <para>The number of elements in bucket <code>n</code>.</para>
1167 </returns>
1168 </method>
1169 <method name="bucket" cv="const">
1170 <parameter name="k">
1171 <paramtype>key_type const&amp;</paramtype>
1172 </parameter>
1173 <type>size_type</type>
1174 <returns>
1175 <para>The index of the bucket which would contain an element with key <code>k</code>.</para>
1176 </returns>
1177 <postconditions>
1178 <para>The return value is less than <code>bucket_count()</code></para>
1179 </postconditions>
1180 </method>
1181 <overloaded-method name="begin">
1182 <signature>
1183 <parameter name="n">
1184 <paramtype>size_type</paramtype>
1185 </parameter>
1186 <type>local_iterator</type>
1187 </signature>
1188 <signature cv="const">
1189 <parameter name="n">
1190 <paramtype>size_type</paramtype>
1191 </parameter>
1192 <type>const_local_iterator</type>
1193 </signature>
1194 <requires>
1195 <para><code>n</code> shall be in the range <code>[0, bucket_count())</code>.</para>
1196 </requires>
1197 <returns>
1198 <para>A local iterator pointing the first element in the bucket with index <code>n</code>.</para>
1199 </returns>
1200 </overloaded-method>
1201 <overloaded-method name="end">
1202 <signature>
1203 <parameter name="n">
1204 <paramtype>size_type</paramtype>
1205 </parameter>
1206 <type>local_iterator</type>
1207 </signature>
1208 <signature cv="const">
1209 <parameter name="n">
1210 <paramtype>size_type</paramtype>
1211 </parameter>
1212 <type>const_local_iterator</type>
1213 </signature>
1214 <requires>
1215 <para><code>n</code> shall be in the range <code>[0, bucket_count())</code>.</para>
1216 </requires>
1217 <returns>
1218 <para>A local iterator pointing the 'one past the end' element in the bucket with index <code>n</code>.</para>
1219 </returns>
1220 </overloaded-method>
1221 <method name="cbegin" cv="const">
1222 <parameter name="n">
1223 <paramtype>size_type</paramtype>
1224 </parameter>
1225 <type>const_local_iterator</type>
1226 <requires>
1227 <para><code>n</code> shall be in the range <code>[0, bucket_count())</code>.</para>
1228 </requires>
1229 <returns>
1230 <para>A constant local iterator pointing the first element in the bucket with index <code>n</code>.</para>
1231 </returns>
1232 </method>
1233 <method name="cend">
1234 <parameter name="n">
1235 <paramtype>size_type</paramtype>
1236 </parameter>
1237 <type>const_local_iterator</type>
1238 <requires>
1239 <para><code>n</code> shall be in the range <code>[0, bucket_count())</code>.</para>
1240 </requires>
1241 <returns>
1242 <para>A constant local iterator pointing the 'one past the end' element in the bucket with index <code>n</code>.</para>
1243 </returns>
1244 </method>
1245 </method-group>
1246 <method-group name="hash policy">
1247 <method name="load_factor" cv="const">
1248 <type>float</type>
1249 <returns>
1250 <para>The average number of elements per bucket.</para>
1251 </returns>
1252 </method>
1253 <method name="max_load_factor" cv="const">
1254 <type>float</type>
1255 <returns>
1256 <para>Returns the current maximum load factor.</para>
1257 </returns>
1258 </method>
1259 <method name="max_load_factor">
1260 <parameter name="z">
1261 <paramtype>float</paramtype>
1262 </parameter>
1263 <type>void</type>
1264 <effects>
1265 <para>Changes the container's maximum load factor, using <code>z</code> as a hint.</para>
1266 </effects>
1267 </method>
1268 <method name="rehash">
1269 <parameter name="n">
1270 <paramtype>size_type</paramtype>
1271 </parameter>
1272 <type>void</type>
1273 <description>
1274 <para>Changes the number of buckets so that there at least <code>n</code> buckets, and so that the load factor is less than the maximum load factor.</para>
1275 <para>Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.</para>
1276 </description>
1277 <throws>
1278 <para>The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.</para>
1279 </throws>
1280 </method>
1281 <method name="reserve">
1282 <parameter name="n">
1283 <paramtype>size_type</paramtype>
1284 </parameter>
1285 <type>void</type>
1286 <description>
1287 <para>Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.</para>
1288 </description>
1289 <throws>
1290 <para>The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.</para>
1291 </throws>
1292 </method>
1293 </method-group>
1294 <free-function-group name="Equality Comparisons">
1295 <function name="operator==">
1296 <template>
1297<?php echo $template_value; ?>
1298 <template-type-parameter name="Hash">
1299 </template-type-parameter>
1300 <template-type-parameter name="Pred">
1301 </template-type-parameter>
1302 <template-type-parameter name="Alloc">
1303 </template-type-parameter>
1304 </template>
1305 <parameter name="x">
1306 <paramtype><?php echo $full_type; ?> const&amp;</paramtype>
1307 </parameter>
1308 <parameter name="y">
1309 <paramtype><?php echo $full_type; ?> const&amp;</paramtype>
1310 </parameter>
1311 <type>bool</type>
1312 <description>
1313<?php if($equivalent_keys): ?>
1314 <para>Return <code>true</code> if <code>x.size() ==
1315 y.size</code> and for every equivalent key group in
1316 <code>x</code>, there is a group in <code>y</code>
1317 for the same key, which is a permutation (using
1318 <code>operator==</code> to compare the value types).
1319 </para>
1320<?php else: ?>
1321 <para>Return <code>true</code> if <code>x.size() ==
1322 y.size</code> and for every element in <code>x</code>,
1323 there is an element in <code>y</code> with the same
1324 for the same key, with an equal value (using
1325 <code>operator==</code> to compare the value types).
1326 </para>
1327<?php endif; ?>
1328 </description>
1329 <notes>
1330 <para>The behavior of this function was changed to match
1331 the C++11 standard in Boost 1.48.</para>
1332 <para>Behavior is undefined if the two containers don't have
1333 equivalent equality predicates.</para>
1334 </notes>
1335 </function>
1336 <function name="operator!=">
1337 <template>
1338<?php echo $template_value; ?>
1339 <template-type-parameter name="Hash">
1340 </template-type-parameter>
1341 <template-type-parameter name="Pred">
1342 </template-type-parameter>
1343 <template-type-parameter name="Alloc">
1344 </template-type-parameter>
1345 </template>
1346 <parameter name="x">
1347 <paramtype><?php echo $full_type; ?> const&amp;</paramtype>
1348 </parameter>
1349 <parameter name="y">
1350 <paramtype><?php echo $full_type; ?> const&amp;</paramtype>
1351 </parameter>
1352 <type>bool</type>
1353 <description>
1354<?php if($equivalent_keys): ?>
1355 <para>Return <code>false</code> if <code>x.size() ==
1356 y.size</code> and for every equivalent key group in
1357 <code>x</code>, there is a group in <code>y</code>
1358 for the same key, which is a permutation (using
1359 <code>operator==</code> to compare the value types).
1360 </para>
1361<?php else: ?>
1362 <para>Return <code>false</code> if <code>x.size() ==
1363 y.size</code> and for every element in <code>x</code>,
1364 there is an element in <code>y</code> with the same
1365 for the same key, with an equal value (using
1366 <code>operator==</code> to compare the value types).
1367 </para>
1368<?php endif; ?>
1369 </description>
1370 <notes>
1371 <para>The behavior of this function was changed to match
1372 the C++11 standard in Boost 1.48.</para>
1373 <para>Behavior is undefined if the two containers don't have
1374 equivalent equality predicates.</para>
1375 </notes>
1376 </function>
1377 </free-function-group>
1378 <free-function-group name="swap">
1379 <function name="swap">
1380 <template>
1381<?php echo $template_value; ?>
1382 <template-type-parameter name="Hash">
1383 </template-type-parameter>
1384 <template-type-parameter name="Pred">
1385 </template-type-parameter>
1386 <template-type-parameter name="Alloc">
1387 </template-type-parameter>
1388 </template>
1389 <parameter name="x">
1390 <paramtype><?php echo $full_type; ?>&amp;</paramtype>
1391 </parameter>
1392 <parameter name="y">
1393 <paramtype><?php echo $full_type; ?>&amp;</paramtype>
1394 </parameter>
1395 <type>void</type>
1396 <effects>
1397 <para><code>x.swap(y)</code></para>
1398 </effects>
1399 <description>
1400 <para>Swaps the contents of <code>x</code> and <code>y</code>.</para>
1401 <para>If <code>Allocator::propagate_on_container_swap</code> is declared and
1402 <code>Allocator::propagate_on_container_swap::value</code> is true then the
1403 containers' allocators are swapped. Otherwise, swapping with unequal allocators
1404 results in undefined behavior.</para>
1405 </description>
1406 <throws>
1407 <para>Doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of <code>key_equal</code> or <code>hasher</code>.</para>
1408 </throws>
1409 <notes>
1410 <para>The exception specifications aren't quite the same as the C++11 standard, as
1411 the equality predieate and hash function are swapped using their copy constructors.</para>
1412 </notes>
1413 </function>
1414 </free-function-group>
1415 </class>
1416<?php
1417}
1418
1419?>
1420<!--
1421Copyright Daniel James 2006-2009
1422Distributed under the Boost Software License, Version 1.0. (See accompanying
1423file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
1424--><library-reference>
1425 <header name="boost/unordered_set.hpp">
1426 <namespace name="boost">
1427<?php
1428echo_unordered_docs(false, false);
1429echo_unordered_docs(false, true);
1430?>
1431 </namespace>
1432 </header>
1433 <header name="boost/unordered_map.hpp">
1434 <namespace name="boost">
1435<?php
1436echo_unordered_docs(true, false);
1437echo_unordered_docs(true, true);
1438?>
1439 </namespace>
1440 </header>
1441 </library-reference>