Boost C++ Libraries Boost.Bimap Home Libraries People FAQ More

PrevUpHomeNext

unordered_set_of Struct Template Reference

Set Type Specification. More...

#include <unordered_set_of.hpp>

Inheritance diagram for unordered_set_of:

Inheritance graph
Collaboration diagram for unordered_set_of:

Collaboration graph
List of all members.

Public Types

typedef HashFunctor hasher
 Hash Functor that takes value_type objects.
typedef EqualKey key_equal
 Functor that compare two value_type objects for equality.
typedef mpl::bool_< false > mutable_key
typedef KeyType value_type
 The type that will be stored in the container.

Detailed Description

template<class KeyType, class HashFunctor = hash< KeyType >, class EqualKey = std::equal_to< KeyType >>
struct boost::bimaps::unordered_set_of< KeyType, HashFunctor, EqualKey >

Set Type Specification.

This struct is used to specify an unordered_set specification. It is not a container, it is just a metaprogramming facility to express the type of a set. Generally, this specification will be used in other place to create a container. It has the same syntax that an tr1::unordered_set instantiation, except that the allocator cannot be specified. The rationale behind this difference is that the allocator is not part of the unordered_set type specification, rather it is a container configuration parameter. The first parameter is the type of the objects in the set, the second one is a Hash Functor that takes objects of this type, and the third one is a Functor that compares them for equality. Bimap binding metafunctions can be used with this class in the following way:

using namespace support;

BOOST_STATIC_ASSERT( is_set_type_of< unordered_set_of<Type> >::value );

BOOST_STATIC_ASSERT
(
     is_same
     <
        unordered_set_of<Type,HashFunctor,EqualKey>::index_bind
        <
            KeyExtractor,
            Tag

        >::type,

        hashed_unique< tag<Tag>, KeyExtractor, HashFunctor, EqualKey >

    >::value
);

typedef bimap
<
    unordered_set_of<Type>, RightKeyType

> bimap_with_left_type_as_unordered_set;

BOOST_STATIC_ASSERT
(
    is_same
    <
        unordered_set_of<Type>::map_view_bind
        <
            member_at::left,
            bimap_with_left_type_as_unordered_set

        >::type,

        unordered_map_view
        <
            member_at::left,
            bimap_with_left_type_as_unordered_set
        >

    >::value
);

See also unordered_set_of_relation.

Definition at line 116 of file unordered_set_of.hpp.


The documentation for this struct was generated from the following file:
Copyright 2006 Matias Capeletto

PrevUpHomeNext