Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This version of Boost is under active development. You are currently in the develop branch. The current version is 1.92.0.
Test ranges to see if only one element matches a value or predicate.
Marshall Clow
namespace boost { namespace algorithm { template<typename InputIterator, typename Predicate> BOOST_CXX14_CONSTEXPR bool one_of(InputIterator, InputIterator, Predicate); template<typename Range, typename Predicate> BOOST_CXX14_CONSTEXPR bool one_of(const Range &, Predicate); template<typename InputIterator, typename V> BOOST_CXX14_CONSTEXPR bool one_of_equal(InputIterator, InputIterator, const V &); template<typename Range, typename V> BOOST_CXX14_CONSTEXPR bool one_of_equal(const Range &, const V &); } }