Copyright © 2005 -2007 Shunsuke Sogame
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Table of Contents
“I tried to commit suicide by sticking my head in the oven, but there was a cake in it.” -- Lesley Boone
Oven is an advanced implementation of Range Library Proposal:
namespace lambda = boost::lambda; using namespace pstade::oven; typedef any_range<int, boost::single_pass_traversal_tag> range; range sieve(range rng) { return rng|dropped(1)|filtered(regular(lambda::_1 % value_front(rng) != 0)); } range primes = iteration(range(counting(2, max_count)), &::sieve)|transformed(value_front); int main() { std::cout << (primes|taken(200)); }
Oven is a header-only template library. All the types, functions and objects
are defined in namespace pstade::oven
.
Oven is known to work on the following platforms:
This document uses the following notation:
Expression |
Semantics |
---|---|
|
An imaginary operator to get the type of an expression. |
|
An imaginary operator to concatenate tokens. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A Range
which behaves as if |
|
A Range |
|
A |
Also, assume that every expression is placed after:
namespace oven = pstade::oven; using namespace oven;
Last revised: January 02, 2008 at 09:05:28 GMT |