1 .. Algorithms/Querying Algorithms//contains |30
17 typedef |unspecified| type;
25 Returns a true-valued |Integral Constant| if one or more elements in ``Sequence``
26 are identical to ``T``.
34 #include <boost/mpl/contains.hpp>
40 +---------------+---------------------------+-----------------------------------+
41 | Parameter | Requirement | Description |
42 +===============+===========================+===================================+
43 | ``Sequence`` | |Forward Sequence| | A sequence to be examined. |
44 +---------------+---------------------------+-----------------------------------+
45 | ``T`` | Any type | A type to search for. |
46 +---------------+---------------------------+-----------------------------------+
52 For any |Forward Sequence| ``s`` and arbitrary type ``t``:
57 typedef contains<s,t>::type r;
68 typedef not_< is_same<
77 Linear. At most ``size<s>::value`` comparisons for identity.
85 typedef vector<char,int,unsigned,long,unsigned long> types;
86 BOOST_MPL_ASSERT_NOT(( contains<types,bool> ));
92 |Querying Algorithms|, |find|, |find_if|, |count|, |lower_bound|
95 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
96 Distributed under the Boost Software License, Version 1.0. (See accompanying
97 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)