...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Front Page / Sequences / Intrinsic Metafunctions / erase_key |
template< typename AssocSeq , typename Key > struct erase_key { typedef unspecified type; };
Erases elements associated with the key Key in the Extensible Associative Sequence AssocSeq .
#include <boost/mpl/erase_key.hpp>
Parameter | Requirement | Description |
---|---|---|
AssocSeq | Extensible Associative Sequence | A sequence to erase elements from. |
Key | Any type | A key for the elements to be removed. |
For any Extensible Associative Sequence s, and arbitrary type key:
typedef erase_key::type r;
Return type: | Extensible Associative Sequence. |
---|---|
Semantics: | r is concept-identical and equivalent to s except that
has_key |
Postcondition: | size |
Amortized constant time.
typedef map< pair, pair > m; typedef erase_key ::type m1; BOOST_MPL_ASSERT_RELATION( size ::type::value, ==, 1 ); BOOST_MPL_ASSERT(( is_same< at ::type,void_ > )); BOOST_MPL_ASSERT(( is_same< at ::type,unsigned > ));