Boost.Algorithm C++11アルゴリズム

Boost.Algorithmには、C++11で新たに追加されたアルゴリズムと、そのRange版が用意されています。
以下はall_ofの例:

#include <iostream>
#include <vector>
#include <boost/algorithm/cxx11/all_of.hpp>

bool is_even(int x) { return x % 2 == 0; }

int main()
{
    const std::vector<int> v = {2, 4, 6, 8, 10};

    std::cout << std::boolalpha;

    // イテレータ版
    {
        const bool result = boost::algorithm::all_of(v.begin(), v.end(), is_even);
        std::cout << result << std::endl;
    }

    // Range版
    {
        const bool result = boost::algorithm::all_of(v, is_even);
        std::cout << result << std::endl;
    }
}
true
true

ここではall_ofのみ紹介していますが、この他にany_of、copy_of、copy_n、find_if_not、iota、is_partitioned、is_permutation、is_sorted、none_of、partition_copy、partition_pointがあります(一部アンドキュメント)。
それぞれ、boost/algorithm/cxx11ディレクトリ以下にアルゴリズム名の.hppファイルがあります。