...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::algorithm::is_permutation — Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2.
// In header: <boost/algorithm/cxx11/is_permutation.hpp> template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate> bool is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, BinaryPredicate p);