...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
For an associative]
Forward Sequence
seq
, returns a associative]
Forward Sequence
containing all the elements of the original except those with a given
key.
template<
typename Key,
typename Sequence
>
typename result_of::erase_key
<Sequence const, Key>::type erase_key(Sequence const& seq);
Table 1.74. Parameters
Parameter |
Requirement |
Description |
---|---|---|
|
A model of Forward Sequence and Associative Sequence |
Operation's argument |
|
Any type |
Key to erase |
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
.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/erase_key.hpp> #include <boost/fusion/include/erase_key.hpp>
assert(erase_key
<int>(make_map
<int, long>('a', 'b')) ==make_map
<long>('b'));