[Home]STLAlgorithmExtensions/ContainsAlgorithm

BOOST WIKI | STLAlgorithmExtensions | RecentChanges | Preferences | Page List | Links List

This algorithm checks to see if the value is equal to one (or more) of the elements in the range. This is related to the STLAlgorithmExtensions/AnyAlgorithm.
template <typename InputIterator, typename T>
bool contains(InputIterator first, InputIterator last, T value)
{
  return std::find(first, last, value) != last;
}

Marshall sez: I don't think that this is related to "any", I think it is the same as "any"....


BOOST WIKI | STLAlgorithmExtensions | RecentChanges | Preferences | Page List | Links List
Edit text of this page | View other revisions
Last edited May 6, 2008 2:40 pm (diff)
Search:
Disclaimer: This site not officially maintained by Boost Developers