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

PrevUpHomeNext

multiset_of Struct Template Reference

Set Type Specification. More...

#include <multiset_of.hpp>

Inheritance diagram for multiset_of:

Inheritance graph
Collaboration diagram for multiset_of:

Collaboration graph
List of all members.

Public Types

typedef KeyCompare key_compare
 Functor that compare two keys.
typedef mpl::bool_< false > mutable_key
typedef KeyType value_type
 Type of the object that will be stored in the set.

Detailed Description

template<class KeyType, class KeyCompare = std::less< KeyType >>
struct boost::bimaps::multiset_of< KeyType, KeyCompare >

Set Type Specification.

This struct is used to specify a multiset 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 std::set instantiation, except that the allocator cannot be specified. The rationale behind this difference is that the allocator is not part of the set type specification, rather it is a container configuration parameter. The first parameter is the type of the objects in the multiset, and the second one is a Functor that compares them. Bimap binding metafunctions can be used with this class in the following way:

using namespace support;

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

BOOST_STATIC_ASSERT
(
     is_same
     <
        compute_index_type
        <
            multiset_of<Type,KeyCompare>,
            KeyExtractor,
            Tag

        >::type
        ,
        ordered_nonunique< tag<Tag>, KeyExtractor, KeyCompare >

    >::value
);

typedef bimap
<
    multiset_of<Type>, RightKeyType

> bimap_with_left_type_as_multiset;

BOOST_STATIC_ASSERT
(
    is_same
    <
        compute_map_view_type
        <
            member_at::left,
            bimap_with_left_type_as_multiset

        >::type,
        multimap_view< member_at::left, bimap_with_left_type_as_multiset >

    >::value
);

See also multiset_of_relation.

Definition at line 109 of file multiset_of.hpp.


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

PrevUpHomeNext