![]() |
Home | Libraries | People | FAQ | More |
Returns a type convertible to bool
that evaluates to true if
the sequence contains an element associated with a Key, else, evaluates
to false.
template <typename Key, typename Sequence>
typename result_of::has_key<Sequence, Key>::type
has_key(Sequence const& seq);
| Parameter | Requirement | Description |
|---|---|---|
seq |
Model of Associative Sequence | The sequence we wish to investigate. |
Key |
Any type | The queried key. |
has_key<Key>(seq);
Return type: Convertible to bool.
Semantics: Evaluates to true if the sequence contains an element
associated with Key, else, evaluates to false.
#include <boost/fusion/sequence/intrinsic/has_key.hpp>
set<int, char, bool> s(1, 'x', true);
assert(has_key<char>(s) == true);
| Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger |