| Home | Libraries | People | FAQ | More

##### erase_key

###### Description

For an associative] Forward Sequence `seq`, returns a associative] Forward Sequence containing all the elements of the original except those with a given key.

###### Synposis

    template<
        typename Key,
        typename Sequence
        >
    typename result_of::erase_key<Sequence const, Key>::type erase_key(Sequence const& seq);

Table 1.75. Parameters

Parameter | Requirement | Description
--- | --- | ---
`seq` | A model of Forward Sequence and Associative Sequence | Operation's argument
`Key` | Any type | Key to erase

###### Expression Semantics

    erase_key<Key>(seq);

Return type: A model of Forward Sequence and Associative Sequence.

Semantics: Returns a new sequence, containing all the elements of `seq`, except those with key `Key`.

###### Complexity

Constant. Returns a view which is lazily evaluated.

###### Header

    #include <boost/fusion/algorithm/transformation/erase_key.hpp>
    #include <boost/fusion/include/erase_key.hpp>

###### Example

    assert(erase_key<int>(make_map<int, long>('a', 'b')) == make_map<long>('b'));