forked from boostorg/unordered
Allocator aware constructors.
This commit is contained in:
@ -281,6 +281,7 @@ C++11 support has resulted in some breaking changes:
|
||||
|
||||
[h2 Boost 1.63.0]
|
||||
|
||||
* Implement missing allocator aware constructors.
|
||||
* Check hint iterator in `insert`/`emplace_hint`.
|
||||
* Fix some warnings, mostly in the tests.
|
||||
* Manually write out `emplace_args` for small numbers of arguments -
|
||||
|
169
doc/ref.php
169
doc/ref.php
@ -246,7 +246,12 @@ EOL;
|
||||
<default>allocator_type()</default>
|
||||
</parameter>
|
||||
<description>
|
||||
<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 and inserts the elements from [f, l) into it.</para>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>eq</code> as the key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
|
||||
@ -310,6 +315,168 @@ EOL;
|
||||
<para>Constructs an container, copying <code>x</code>'s contained elements, hash function, predicate, maximum load factor, but using allocator <code>a</code>.</para>
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="x">
|
||||
<paramtype><?php echo $name; ?> &&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>Allocator const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<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>
|
||||
</description>
|
||||
<notes>
|
||||
<para>This is implemented using Boost.Move.</para>
|
||||
</notes>
|
||||
<requires>
|
||||
<para>
|
||||
<code>value_type</code> is move insertable.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="il">
|
||||
<paramtype>initializer_list<value_type></paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
<default><emphasis>implementation-defined</emphasis></default>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
<default>hasher()</default>
|
||||
</parameter>
|
||||
<parameter name="eq">
|
||||
<paramtype>key_equal const&</paramtype>
|
||||
<default>key_equal()</default>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
<default>allocator_type()</default>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>eq</code> as the key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0
|
||||
and inserts the elements from <code>il</code> into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
|
||||
<code>allocator_type</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<postconditions>
|
||||
<code><methodname>size</methodname>() == 0</code>
|
||||
</postconditions>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
the default hash function and key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0.</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>hasher</code> and <code>key_equal</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<postconditions>
|
||||
<code><methodname>size</methodname>() == 0</code>
|
||||
</postconditions>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
the default key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0.</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>key_equal</code> needs to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<template>
|
||||
<template-type-parameter name="InputIterator">
|
||||
</template-type-parameter>
|
||||
</template>
|
||||
<parameter name="f">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="l">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>a</code> as the allocator, with the
|
||||
default hash function and key equality predicate
|
||||
and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>hasher</code>, <code>key_equal</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<template>
|
||||
<template-type-parameter name="InputIterator">
|
||||
</template-type-parameter>
|
||||
</template>
|
||||
<parameter name="f">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="l">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>a</code> as the allocator, with the
|
||||
default key equality predicate
|
||||
and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>key_equal</code> needs to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<destructor>
|
||||
<notes>
|
||||
<para>The destructor is applied to every element, and all memory is deallocated</para>
|
||||
|
676
doc/ref.xml
676
doc/ref.xml
@ -187,7 +187,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
<default>allocator_type()</default>
|
||||
</parameter>
|
||||
<description>
|
||||
<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 and inserts the elements from [f, l) into it.</para>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>eq</code> as the key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
|
||||
@ -251,6 +256,168 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
<para>Constructs an container, copying <code>x</code>'s contained elements, hash function, predicate, maximum load factor, but using allocator <code>a</code>.</para>
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="x">
|
||||
<paramtype>unordered_set &&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>Allocator const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<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>
|
||||
</description>
|
||||
<notes>
|
||||
<para>This is implemented using Boost.Move.</para>
|
||||
</notes>
|
||||
<requires>
|
||||
<para>
|
||||
<code>value_type</code> is move insertable.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="il">
|
||||
<paramtype>initializer_list<value_type></paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
<default><emphasis>implementation-defined</emphasis></default>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
<default>hasher()</default>
|
||||
</parameter>
|
||||
<parameter name="eq">
|
||||
<paramtype>key_equal const&</paramtype>
|
||||
<default>key_equal()</default>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
<default>allocator_type()</default>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>eq</code> as the key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0
|
||||
and inserts the elements from <code>il</code> into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
|
||||
<code>allocator_type</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<postconditions>
|
||||
<code><methodname>size</methodname>() == 0</code>
|
||||
</postconditions>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
the default hash function and key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0.</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>hasher</code> and <code>key_equal</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<postconditions>
|
||||
<code><methodname>size</methodname>() == 0</code>
|
||||
</postconditions>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
the default key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0.</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>key_equal</code> needs to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<template>
|
||||
<template-type-parameter name="InputIterator">
|
||||
</template-type-parameter>
|
||||
</template>
|
||||
<parameter name="f">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="l">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>a</code> as the allocator, with the
|
||||
default hash function and key equality predicate
|
||||
and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>hasher</code>, <code>key_equal</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<template>
|
||||
<template-type-parameter name="InputIterator">
|
||||
</template-type-parameter>
|
||||
</template>
|
||||
<parameter name="f">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="l">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>a</code> as the allocator, with the
|
||||
default key equality predicate
|
||||
and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>key_equal</code> needs to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<destructor>
|
||||
<notes>
|
||||
<para>The destructor is applied to every element, and all memory is deallocated</para>
|
||||
@ -1261,7 +1428,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
<default>allocator_type()</default>
|
||||
</parameter>
|
||||
<description>
|
||||
<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 and inserts the elements from [f, l) into it.</para>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>eq</code> as the key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
|
||||
@ -1325,6 +1497,168 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
<para>Constructs an container, copying <code>x</code>'s contained elements, hash function, predicate, maximum load factor, but using allocator <code>a</code>.</para>
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="x">
|
||||
<paramtype>unordered_multiset &&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>Allocator const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<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>
|
||||
</description>
|
||||
<notes>
|
||||
<para>This is implemented using Boost.Move.</para>
|
||||
</notes>
|
||||
<requires>
|
||||
<para>
|
||||
<code>value_type</code> is move insertable.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="il">
|
||||
<paramtype>initializer_list<value_type></paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
<default><emphasis>implementation-defined</emphasis></default>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
<default>hasher()</default>
|
||||
</parameter>
|
||||
<parameter name="eq">
|
||||
<paramtype>key_equal const&</paramtype>
|
||||
<default>key_equal()</default>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
<default>allocator_type()</default>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>eq</code> as the key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0
|
||||
and inserts the elements from <code>il</code> into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
|
||||
<code>allocator_type</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<postconditions>
|
||||
<code><methodname>size</methodname>() == 0</code>
|
||||
</postconditions>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
the default hash function and key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0.</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>hasher</code> and <code>key_equal</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<postconditions>
|
||||
<code><methodname>size</methodname>() == 0</code>
|
||||
</postconditions>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
the default key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0.</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>key_equal</code> needs to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<template>
|
||||
<template-type-parameter name="InputIterator">
|
||||
</template-type-parameter>
|
||||
</template>
|
||||
<parameter name="f">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="l">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>a</code> as the allocator, with the
|
||||
default hash function and key equality predicate
|
||||
and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>hasher</code>, <code>key_equal</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<template>
|
||||
<template-type-parameter name="InputIterator">
|
||||
</template-type-parameter>
|
||||
</template>
|
||||
<parameter name="f">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="l">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>a</code> as the allocator, with the
|
||||
default key equality predicate
|
||||
and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>key_equal</code> needs to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<destructor>
|
||||
<notes>
|
||||
<para>The destructor is applied to every element, and all memory is deallocated</para>
|
||||
@ -2344,7 +2678,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
<default>allocator_type()</default>
|
||||
</parameter>
|
||||
<description>
|
||||
<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 and inserts the elements from [f, l) into it.</para>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>eq</code> as the key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
|
||||
@ -2408,6 +2747,168 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
<para>Constructs an container, copying <code>x</code>'s contained elements, hash function, predicate, maximum load factor, but using allocator <code>a</code>.</para>
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="x">
|
||||
<paramtype>unordered_map &&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>Allocator const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<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>
|
||||
</description>
|
||||
<notes>
|
||||
<para>This is implemented using Boost.Move.</para>
|
||||
</notes>
|
||||
<requires>
|
||||
<para>
|
||||
<code>value_type</code> is move insertable.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="il">
|
||||
<paramtype>initializer_list<value_type></paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
<default><emphasis>implementation-defined</emphasis></default>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
<default>hasher()</default>
|
||||
</parameter>
|
||||
<parameter name="eq">
|
||||
<paramtype>key_equal const&</paramtype>
|
||||
<default>key_equal()</default>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
<default>allocator_type()</default>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>eq</code> as the key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0
|
||||
and inserts the elements from <code>il</code> into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
|
||||
<code>allocator_type</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<postconditions>
|
||||
<code><methodname>size</methodname>() == 0</code>
|
||||
</postconditions>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
the default hash function and key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0.</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>hasher</code> and <code>key_equal</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<postconditions>
|
||||
<code><methodname>size</methodname>() == 0</code>
|
||||
</postconditions>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
the default key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0.</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>key_equal</code> needs to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<template>
|
||||
<template-type-parameter name="InputIterator">
|
||||
</template-type-parameter>
|
||||
</template>
|
||||
<parameter name="f">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="l">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>a</code> as the allocator, with the
|
||||
default hash function and key equality predicate
|
||||
and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>hasher</code>, <code>key_equal</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<template>
|
||||
<template-type-parameter name="InputIterator">
|
||||
</template-type-parameter>
|
||||
</template>
|
||||
<parameter name="f">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="l">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>a</code> as the allocator, with the
|
||||
default key equality predicate
|
||||
and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>key_equal</code> needs to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<destructor>
|
||||
<notes>
|
||||
<para>The destructor is applied to every element, and all memory is deallocated</para>
|
||||
@ -3465,7 +3966,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
<default>allocator_type()</default>
|
||||
</parameter>
|
||||
<description>
|
||||
<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 and inserts the elements from [f, l) into it.</para>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>eq</code> as the key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
|
||||
@ -3529,6 +4035,168 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
<para>Constructs an container, copying <code>x</code>'s contained elements, hash function, predicate, maximum load factor, but using allocator <code>a</code>.</para>
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="x">
|
||||
<paramtype>unordered_multimap &&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>Allocator const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<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>
|
||||
</description>
|
||||
<notes>
|
||||
<para>This is implemented using Boost.Move.</para>
|
||||
</notes>
|
||||
<requires>
|
||||
<para>
|
||||
<code>value_type</code> is move insertable.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="il">
|
||||
<paramtype>initializer_list<value_type></paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
<default><emphasis>implementation-defined</emphasis></default>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
<default>hasher()</default>
|
||||
</parameter>
|
||||
<parameter name="eq">
|
||||
<paramtype>key_equal const&</paramtype>
|
||||
<default>key_equal()</default>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
<default>allocator_type()</default>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>eq</code> as the key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0
|
||||
and inserts the elements from <code>il</code> into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
|
||||
<code>allocator_type</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<postconditions>
|
||||
<code><methodname>size</methodname>() == 0</code>
|
||||
</postconditions>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
the default hash function and key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0.</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>hasher</code> and <code>key_equal</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<postconditions>
|
||||
<code><methodname>size</methodname>() == 0</code>
|
||||
</postconditions>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
the default key equality predicate,
|
||||
<code>a</code> as the allocator and a maximum load factor of 1.0.</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>key_equal</code> needs to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<template>
|
||||
<template-type-parameter name="InputIterator">
|
||||
</template-type-parameter>
|
||||
</template>
|
||||
<parameter name="f">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="l">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>a</code> as the allocator, with the
|
||||
default hash function and key equality predicate
|
||||
and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>hasher</code>, <code>key_equal</code> need to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<constructor>
|
||||
<template>
|
||||
<template-type-parameter name="InputIterator">
|
||||
</template-type-parameter>
|
||||
</template>
|
||||
<parameter name="f">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="l">
|
||||
<paramtype>InputIterator</paramtype>
|
||||
</parameter>
|
||||
<parameter name="n">
|
||||
<paramtype>size_type</paramtype>
|
||||
</parameter>
|
||||
<parameter name="hf">
|
||||
<paramtype>hasher const&</paramtype>
|
||||
</parameter>
|
||||
<parameter name="a">
|
||||
<paramtype>allocator_type const&</paramtype>
|
||||
</parameter>
|
||||
<description>
|
||||
<para>Constructs an empty container with at least <code>n</code> buckets,
|
||||
using <code>hf</code> as the hash function,
|
||||
<code>a</code> as the allocator, with the
|
||||
default key equality predicate
|
||||
and a maximum load factor of 1.0
|
||||
and inserts the elements from [f, l) into it.
|
||||
</para>
|
||||
</description>
|
||||
<requires>
|
||||
<para><code>key_equal</code> needs to be <code>DefaultConstructible</code>.
|
||||
</para>
|
||||
</requires>
|
||||
</constructor>
|
||||
<destructor>
|
||||
<notes>
|
||||
<para>The destructor is applied to every element, and all memory is deallocated</para>
|
||||
|
@ -108,6 +108,19 @@ namespace unordered
|
||||
const key_equal&,
|
||||
const allocator_type&);
|
||||
|
||||
template <class InputIt>
|
||||
unordered_map(
|
||||
InputIt, InputIt,
|
||||
size_type,
|
||||
const hasher&,
|
||||
const allocator_type&);
|
||||
|
||||
template <class InputIt>
|
||||
unordered_map(
|
||||
InputIt, InputIt,
|
||||
size_type,
|
||||
const allocator_type&);
|
||||
|
||||
// copy/move constructors
|
||||
|
||||
unordered_map(unordered_map const&);
|
||||
@ -139,6 +152,15 @@ namespace unordered
|
||||
const hasher& = hasher(),
|
||||
const key_equal&l = key_equal(),
|
||||
const allocator_type& = allocator_type());
|
||||
unordered_map(
|
||||
std::initializer_list<value_type>,
|
||||
size_type,
|
||||
const hasher&,
|
||||
const allocator_type&);
|
||||
unordered_map(
|
||||
std::initializer_list<value_type>,
|
||||
size_type,
|
||||
const allocator_type&);
|
||||
#endif
|
||||
|
||||
// Destructor
|
||||
@ -570,6 +592,13 @@ namespace unordered
|
||||
const hasher& = hasher(),
|
||||
const key_equal& = key_equal(),
|
||||
const allocator_type& = allocator_type());
|
||||
explicit unordered_multimap(
|
||||
size_type,
|
||||
const allocator_type&);
|
||||
explicit unordered_multimap(
|
||||
size_type,
|
||||
const hasher&,
|
||||
const allocator_type&);
|
||||
|
||||
explicit unordered_multimap(allocator_type const&);
|
||||
|
||||
@ -591,11 +620,25 @@ namespace unordered
|
||||
const key_equal&,
|
||||
const allocator_type&);
|
||||
|
||||
template <class InputIt>
|
||||
unordered_multimap(
|
||||
InputIt, InputIt,
|
||||
size_type,
|
||||
const hasher&,
|
||||
const allocator_type&);
|
||||
|
||||
template <class InputIt>
|
||||
unordered_multimap(
|
||||
InputIt, InputIt,
|
||||
size_type,
|
||||
const allocator_type&);
|
||||
|
||||
// copy/move constructors
|
||||
|
||||
unordered_multimap(unordered_multimap const&);
|
||||
|
||||
unordered_multimap(unordered_multimap const&, allocator_type const&);
|
||||
unordered_multimap(BOOST_RV_REF(unordered_multimap), allocator_type const&);
|
||||
|
||||
#if defined(BOOST_UNORDERED_USE_MOVE)
|
||||
unordered_multimap(BOOST_RV_REF(unordered_multimap) other)
|
||||
@ -611,10 +654,6 @@ namespace unordered
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
unordered_multimap(unordered_multimap&&, allocator_type const&);
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
unordered_multimap(
|
||||
std::initializer_list<value_type>,
|
||||
@ -622,6 +661,15 @@ namespace unordered
|
||||
const hasher& = hasher(),
|
||||
const key_equal&l = key_equal(),
|
||||
const allocator_type& = allocator_type());
|
||||
unordered_multimap(
|
||||
std::initializer_list<value_type>,
|
||||
size_type,
|
||||
const hasher&,
|
||||
const allocator_type&);
|
||||
unordered_multimap(
|
||||
std::initializer_list<value_type>,
|
||||
size_type,
|
||||
const allocator_type&);
|
||||
#endif
|
||||
|
||||
// Destructor
|
||||
@ -1059,6 +1107,31 @@ namespace unordered
|
||||
table_.insert_range(f, l);
|
||||
}
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
template <class InputIt>
|
||||
unordered_map<K,T,H,P,A>::unordered_map(
|
||||
InputIt f, InputIt l,
|
||||
size_type n,
|
||||
const hasher &hf,
|
||||
const allocator_type &a)
|
||||
: table_(boost::unordered::detail::initial_size(f, l, n),
|
||||
hf, key_equal(), a)
|
||||
{
|
||||
table_.insert_range(f, l);
|
||||
}
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
template <class InputIt>
|
||||
unordered_map<K,T,H,P,A>::unordered_map(
|
||||
InputIt f, InputIt l,
|
||||
size_type n,
|
||||
const allocator_type &a)
|
||||
: table_(boost::unordered::detail::initial_size(f, l, n),
|
||||
hasher(), key_equal(), a)
|
||||
{
|
||||
table_.insert_range(f, l);
|
||||
}
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
unordered_map<K,T,H,P,A>::~unordered_map() BOOST_NOEXCEPT {}
|
||||
|
||||
@ -1094,6 +1167,30 @@ namespace unordered
|
||||
table_.insert_range(list.begin(), list.end());
|
||||
}
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
unordered_map<K,T,H,P,A>::unordered_map(
|
||||
std::initializer_list<value_type> list, size_type n,
|
||||
const hasher &hf, const allocator_type &a)
|
||||
: table_(
|
||||
boost::unordered::detail::initial_size(
|
||||
list.begin(), list.end(), n),
|
||||
hf, key_equal(), a)
|
||||
{
|
||||
table_.insert_range(list.begin(), list.end());
|
||||
}
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
unordered_map<K,T,H,P,A>::unordered_map(
|
||||
std::initializer_list<value_type> list, size_type n,
|
||||
const allocator_type &a)
|
||||
: table_(
|
||||
boost::unordered::detail::initial_size(
|
||||
list.begin(), list.end(), n),
|
||||
hasher(), key_equal(), a)
|
||||
{
|
||||
table_.insert_range(list.begin(), list.end());
|
||||
}
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
unordered_map<K,T,H,P,A>& unordered_map<K,T,H,P,A>::operator=(
|
||||
std::initializer_list<value_type> list)
|
||||
@ -1392,6 +1489,31 @@ namespace unordered
|
||||
table_.insert_range(f, l);
|
||||
}
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
template <class InputIt>
|
||||
unordered_multimap<K,T,H,P,A>::unordered_multimap(
|
||||
InputIt f, InputIt l,
|
||||
size_type n,
|
||||
const hasher &hf,
|
||||
const allocator_type &a)
|
||||
: table_(boost::unordered::detail::initial_size(f, l, n),
|
||||
hf, key_equal(), a)
|
||||
{
|
||||
table_.insert_range(f, l);
|
||||
}
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
template <class InputIt>
|
||||
unordered_multimap<K,T,H,P,A>::unordered_multimap(
|
||||
InputIt f, InputIt l,
|
||||
size_type n,
|
||||
const allocator_type &a)
|
||||
: table_(boost::unordered::detail::initial_size(f, l, n),
|
||||
hasher(), key_equal(), a)
|
||||
{
|
||||
table_.insert_range(f, l);
|
||||
}
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
unordered_multimap<K,T,H,P,A>::~unordered_multimap() BOOST_NOEXCEPT {}
|
||||
|
||||
@ -1427,6 +1549,30 @@ namespace unordered
|
||||
table_.insert_range(list.begin(), list.end());
|
||||
}
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
unordered_multimap<K,T,H,P,A>::unordered_multimap(
|
||||
std::initializer_list<value_type> list, size_type n,
|
||||
const hasher &hf, const allocator_type &a)
|
||||
: table_(
|
||||
boost::unordered::detail::initial_size(
|
||||
list.begin(), list.end(), n),
|
||||
hf, key_equal(), a)
|
||||
{
|
||||
table_.insert_range(list.begin(), list.end());
|
||||
}
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
unordered_multimap<K,T,H,P,A>::unordered_multimap(
|
||||
std::initializer_list<value_type> list, size_type n,
|
||||
const allocator_type &a)
|
||||
: table_(
|
||||
boost::unordered::detail::initial_size(
|
||||
list.begin(), list.end(), n),
|
||||
hasher(), key_equal(), a)
|
||||
{
|
||||
table_.insert_range(list.begin(), list.end());
|
||||
}
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
unordered_multimap<K,T,H,P,A>& unordered_multimap<K,T,H,P,A>::operator=(
|
||||
std::initializer_list<value_type> list)
|
||||
|
@ -105,6 +105,19 @@ namespace unordered
|
||||
const key_equal&,
|
||||
const allocator_type&);
|
||||
|
||||
template <class InputIt>
|
||||
unordered_set(
|
||||
InputIt, InputIt,
|
||||
size_type,
|
||||
const hasher&,
|
||||
const allocator_type&);
|
||||
|
||||
template <class InputIt>
|
||||
unordered_set(
|
||||
InputIt, InputIt,
|
||||
size_type,
|
||||
const allocator_type&);
|
||||
|
||||
// copy/move constructors
|
||||
|
||||
unordered_set(unordered_set const&);
|
||||
@ -136,6 +149,15 @@ namespace unordered
|
||||
const hasher& = hasher(),
|
||||
const key_equal&l = key_equal(),
|
||||
const allocator_type& = allocator_type());
|
||||
unordered_set(
|
||||
std::initializer_list<value_type>,
|
||||
size_type,
|
||||
const hasher&,
|
||||
const allocator_type&);
|
||||
unordered_set(
|
||||
std::initializer_list<value_type>,
|
||||
size_type,
|
||||
const allocator_type&);
|
||||
#endif
|
||||
|
||||
// Destructor
|
||||
@ -574,6 +596,19 @@ namespace unordered
|
||||
const key_equal&,
|
||||
const allocator_type&);
|
||||
|
||||
template <class InputIt>
|
||||
unordered_multiset(
|
||||
InputIt, InputIt,
|
||||
size_type,
|
||||
const hasher&,
|
||||
const allocator_type&);
|
||||
|
||||
template <class InputIt>
|
||||
unordered_multiset(
|
||||
InputIt, InputIt,
|
||||
size_type,
|
||||
const allocator_type&);
|
||||
|
||||
// copy/move constructors
|
||||
|
||||
unordered_multiset(unordered_multiset const&);
|
||||
@ -605,6 +640,15 @@ namespace unordered
|
||||
const hasher& = hasher(),
|
||||
const key_equal&l = key_equal(),
|
||||
const allocator_type& = allocator_type());
|
||||
unordered_multiset(
|
||||
std::initializer_list<value_type>,
|
||||
size_type,
|
||||
const hasher&,
|
||||
const allocator_type&);
|
||||
unordered_multiset(
|
||||
std::initializer_list<value_type>,
|
||||
size_type,
|
||||
const allocator_type&);
|
||||
#endif
|
||||
|
||||
// Destructor
|
||||
@ -1033,6 +1077,31 @@ namespace unordered
|
||||
table_.insert_range(f, l);
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
template <class InputIt>
|
||||
unordered_set<T,H,P,A>::unordered_set(
|
||||
InputIt f, InputIt l,
|
||||
size_type n,
|
||||
const hasher &hf,
|
||||
const allocator_type &a)
|
||||
: table_(boost::unordered::detail::initial_size(f, l, n),
|
||||
hf, key_equal(), a)
|
||||
{
|
||||
table_.insert_range(f, l);
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
template <class InputIt>
|
||||
unordered_set<T,H,P,A>::unordered_set(
|
||||
InputIt f, InputIt l,
|
||||
size_type n,
|
||||
const allocator_type &a)
|
||||
: table_(boost::unordered::detail::initial_size(f, l, n),
|
||||
hasher(), key_equal(), a)
|
||||
{
|
||||
table_.insert_range(f, l);
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
unordered_set<T,H,P,A>::~unordered_set() BOOST_NOEXCEPT {}
|
||||
|
||||
@ -1068,6 +1137,30 @@ namespace unordered
|
||||
table_.insert_range(list.begin(), list.end());
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
unordered_set<T,H,P,A>::unordered_set(
|
||||
std::initializer_list<value_type> list, size_type n,
|
||||
const hasher &hf, const allocator_type &a)
|
||||
: table_(
|
||||
boost::unordered::detail::initial_size(
|
||||
list.begin(), list.end(), n),
|
||||
hf, key_equal(), a)
|
||||
{
|
||||
table_.insert_range(list.begin(), list.end());
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
unordered_set<T,H,P,A>::unordered_set(
|
||||
std::initializer_list<value_type> list, size_type n,
|
||||
const allocator_type &a)
|
||||
: table_(
|
||||
boost::unordered::detail::initial_size(
|
||||
list.begin(), list.end(), n),
|
||||
hasher(), key_equal(), a)
|
||||
{
|
||||
table_.insert_range(list.begin(), list.end());
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
unordered_set<T,H,P,A>& unordered_set<T,H,P,A>::operator=(
|
||||
std::initializer_list<value_type> list)
|
||||
@ -1317,6 +1410,31 @@ namespace unordered
|
||||
table_.insert_range(f, l);
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
template <class InputIt>
|
||||
unordered_multiset<T,H,P,A>::unordered_multiset(
|
||||
InputIt f, InputIt l,
|
||||
size_type n,
|
||||
const hasher &hf,
|
||||
const allocator_type &a)
|
||||
: table_(boost::unordered::detail::initial_size(f, l, n),
|
||||
hf, key_equal(), a)
|
||||
{
|
||||
table_.insert_range(f, l);
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
template <class InputIt>
|
||||
unordered_multiset<T,H,P,A>::unordered_multiset(
|
||||
InputIt f, InputIt l,
|
||||
size_type n,
|
||||
const allocator_type &a)
|
||||
: table_(boost::unordered::detail::initial_size(f, l, n),
|
||||
hasher(), key_equal(), a)
|
||||
{
|
||||
table_.insert_range(f, l);
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
unordered_multiset<T,H,P,A>::~unordered_multiset() BOOST_NOEXCEPT {}
|
||||
|
||||
@ -1352,6 +1470,30 @@ namespace unordered
|
||||
table_.insert_range(list.begin(), list.end());
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
unordered_multiset<T,H,P,A>::unordered_multiset(
|
||||
std::initializer_list<value_type> list, size_type n,
|
||||
const hasher &hf, const allocator_type &a)
|
||||
: table_(
|
||||
boost::unordered::detail::initial_size(
|
||||
list.begin(), list.end(), n),
|
||||
hf, key_equal(), a)
|
||||
{
|
||||
table_.insert_range(list.begin(), list.end());
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
unordered_multiset<T,H,P,A>::unordered_multiset(
|
||||
std::initializer_list<value_type> list, size_type n,
|
||||
const allocator_type &a)
|
||||
: table_(
|
||||
boost::unordered::detail::initial_size(
|
||||
list.begin(), list.end(), n),
|
||||
hasher(), key_equal(), a)
|
||||
{
|
||||
table_.insert_range(list.begin(), list.end());
|
||||
}
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
unordered_multiset<T,H,P,A>& unordered_multiset<T,H,P,A>::operator=(
|
||||
std::initializer_list<value_type> list)
|
||||
|
@ -111,6 +111,7 @@ void container_test(X& r, T const&)
|
||||
sink(X(a));
|
||||
X u2(a);
|
||||
X u3 = a;
|
||||
X u4(rvalue(a_const));
|
||||
|
||||
a.swap(b);
|
||||
boost::swap(a, b);
|
||||
@ -120,12 +121,24 @@ void container_test(X& r, T const&)
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type;
|
||||
test::check_return_type<allocator_type>::equals(a_const.get_allocator());
|
||||
|
||||
allocator_type m = a.get_allocator();
|
||||
sink(X(m));
|
||||
X c(m);
|
||||
sink(X(a_const, m));
|
||||
X c2(a_const, m);
|
||||
sink(X(rvalue(a_const), m));
|
||||
X c3(rvalue(a_const), m);
|
||||
|
||||
// Avoid unused variable warnings:
|
||||
|
||||
sink(u);
|
||||
sink(u2);
|
||||
sink(u3);
|
||||
sink(u4);
|
||||
sink(c);
|
||||
sink(c2);
|
||||
sink(c3);
|
||||
}
|
||||
|
||||
template <class X>
|
||||
@ -449,14 +462,15 @@ void unordered_copyable_test(X& x, Key& k, T& t, Hash& hf, Pred& eq)
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator;
|
||||
typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type;
|
||||
|
||||
X a;
|
||||
allocator_type m = a.get_allocator();
|
||||
|
||||
BOOST_DEDUCED_TYPENAME X::value_type* i = 0;
|
||||
BOOST_DEDUCED_TYPENAME X::value_type* j = 0;
|
||||
|
||||
X(i, j, 10, hf, eq);
|
||||
|
||||
X a5(i, j, 10, hf, eq);
|
||||
X(i, j, 10, hf);
|
||||
X a6(i, j, 10, hf);
|
||||
@ -465,6 +479,22 @@ void unordered_copyable_test(X& x, Key& k, T& t, Hash& hf, Pred& eq)
|
||||
X(i, j);
|
||||
X a8(i, j);
|
||||
|
||||
X(i, j, 10, hf, m);
|
||||
X(i, j, 10, m);
|
||||
//X(i, j, m);
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
std::size_t min_buckets = 10;
|
||||
X({t});
|
||||
X({t}, min_buckets);
|
||||
X({t}, min_buckets, hf);
|
||||
X({t}, min_buckets, hf, eq);
|
||||
//X({t}, m);
|
||||
X({t}, min_buckets, m);
|
||||
X({t}, min_buckets, hf, m);
|
||||
X({t}, min_buckets, hf, eq, m);
|
||||
#endif
|
||||
|
||||
X const b;
|
||||
sink(X(b));
|
||||
X a9(b);
|
||||
|
Reference in New Issue
Block a user