Constructors

Synopses

Declared in <bslstl_unorderedset.h>

Create an empty unordered set.

Create an unordered set having the same value as the specified original.

unordered_set(unordered_set const& original);

Create an unordered set by moving the contents of the specified original.

Create an empty unordered set using the specified basicAllocator.

explicit
unordered_set(ALLOCATOR const& basicAllocator);

Create an empty unordered set with the specified parameters.

unordered_set(
    size_type initialNumBuckets,
    ALLOCATOR const& basicAllocator);

Create an unordered set by moving original, using basicAllocator.

unordered_set(
    BloombergLP::bslmf::MovableRef<unordered_set> original,
    ALLOCATOR const& basicAllocator);

Create an unordered set having the same value as the specified original object that uses the specified basicAllocator to supply memory.

unordered_set(
    unordered_set const& original,
    ALLOCATOR const& basicAllocator);

Create an unordered set from the specified values initializer list.

template<class = void>
requires bsl::IsStdAllocator<ALLOCATOR>::value
unordered_set(
    std::initializer_list<KEY> values,
    ALLOCATOR const& basicAllocator);

Create an empty unordered set with the specified parameters.

unordered_set(
    size_type initialNumBuckets,
    HASH const& hashFunction,
    ALLOCATOR const& basicAllocator);

Create an unordered set from the specified iterator range.

template<class INPUT_ITERATOR>
unordered_set(
    INPUT_ITERATOR first,
    INPUT_ITERATOR last,
    ALLOCATOR const& basicAllocator);

Create an unordered set from the specified range.

template<class RANGE>
unordered_set(
    std::from_range_t tag,
    RANGE&& range,
    ALLOCATOR const& basicAllocator);

Create an unordered set from the specified values initializer list.

template<class = void>
requires bsl::IsStdAllocator<ALLOCATOR>::value
unordered_set(
    std::initializer_list<KEY> values,
    size_type initialNumBuckets,
    ALLOCATOR const& basicAllocator);

Create an empty unordered set with the specified bucket count.

explicit
unordered_set(
    size_type initialNumBuckets,
    HASH const& hashFunction = HASH(),
    EQUAL const& keyEqual = EQUAL(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());

Create an unordered set from the specified iterator range.

template<class INPUT_ITERATOR>
unordered_set(
    INPUT_ITERATOR first,
    INPUT_ITERATOR last,
    size_type initialNumBuckets,
    ALLOCATOR const& basicAllocator);

Create an unordered set from the specified range.

template<class RANGE>
unordered_set(
    std::from_range_t tag,
    RANGE&& range,
    size_type initialNumBuckets,
    ALLOCATOR const& basicAllocator);

Create an unordered set from the specified values initializer list.

template<
    class = void,
    class = void>
requires std::is_invocable_v<HASH, const KEY &> && bsl::IsStdAllocator<ALLOCATOR>::value
unordered_set(
    std::initializer_list<KEY> values,
    size_type initialNumBuckets,
    HASH const& hashFunction,
    ALLOCATOR const& basicAllocator);

Create an unordered set from the specified iterator range.

template<class INPUT_ITERATOR>
unordered_set(
    INPUT_ITERATOR first,
    INPUT_ITERATOR last,
    size_type initialNumBuckets,
    HASH const& hashFunction,
    ALLOCATOR const& basicAllocator);

Create an unordered set from the specified range.

template<class RANGE>
unordered_set(
    std::from_range_t tag,
    RANGE&& range,
    size_type initialNumBuckets,
    HASH const& hashFunction,
    ALLOCATOR const& basicAllocator);

Create an unordered set from the specified values initializer list.

template<
    class = void,
    class = void,
    class = void>
requires std::is_invocable_v<HASH, const KEY &> && std::is_invocable_v<EQUAL, const KEY &, const KEY &> && bsl::IsStdAllocator_v<ALLOCATOR>
unordered_set(
    std::initializer_list<KEY> values,
    size_type initialNumBuckets = 0,
    HASH const& hashFunction = HASH(),
    EQUAL const& keyEqual = EQUAL(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());

Create an unordered set from the specified iterator range.

template<class INPUT_ITERATOR>
unordered_set(
    INPUT_ITERATOR first,
    INPUT_ITERATOR last,
    size_type initialNumBuckets = 0,
    HASH const& hashFunction = HASH(),
    EQUAL const& keyEqual = EQUAL(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());

Create an unordered set from the specified range.

template<class RANGE>
unordered_set(
    std::from_range_t tag,
    RANGE&& range,
    size_type initialNumBuckets = 0,
    HASH const& hashFunction = HASH(),
    EQUAL const& keyEqual = EQUAL(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());

Parameters

Name

Description

original

source unordered set

basicAllocator

allocator used to supply memory

initialNumBuckets

initial number of buckets

values

initializer list of values

hashFunction

hash function

first

the start of the iterator range

last

one past the end of the iterator range

tag

disambiguation tag for the range constructor

range

range of values to insert

keyEqual

key‐equality functor

Created with MrDocs