|
Boost : |
From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-07-14 23:22:25
Hi, all
A new version of Oven, a range library proposal implementation, has been uploaded
to Boost.Vault/Algorithm.
The file:
http://tinyurl.com/2axp2l
Range Library Proposal:
http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1871.html
An example "infinite sequence of factorials":
void test()
{
BOOST_AUTO(factorials,
expression(counting(1, max_count)|scanned(1, regular(lambda::_1 * lambda::_2))) );
int const answer[] = { 1,1,2,6,24,120,720,5040,40320,362880 };
BOOST_CHECK( equals(factorials|taken(10), answer) );
}
This library is highly preliminary, but moderately tested.
Any feedback appreciated.
Regards,
-- Shunsuke Sogame
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk