2009-12-04から1日間の記事一覧

oven::front

C++

oven::frontは範囲の先頭要素を参照する範囲アルゴリズムです。 #include <cassert> #include <vector> #include <pstade/oven/initial_values.hpp> #include <pstade/oven/front.hpp> using namespace pstade::oven; int main() { std::vector<int> v = initial_values(3, 1, 4); assert(front(v) == 3); assert((v|front) == 3); v|front </int></pstade/oven/front.hpp></pstade/oven/initial_values.hpp></vector></cassert>…