|
Boost : |
From: FlSt_at_[hidden]
Date: 2005-08-01 06:30:19
Hello.
I uploaded a new version of the junction comparison of ranges to boost
sandbox file vault ( flos_junction_v6.zip ). When find it useful or you
have critism on the implementation tell it to me. There is still the
naming problem, i don't want call them junctions. Has anyone an idea?
A short description of the usage, because the example is more something
like a test (to much macros):
#include<junction.hpp>
using namespace boost;
...
set<int> a;
vector<int> b;
// fill a and b with values
if( any_of( a ) >= all_of( b ) ) { ... }
...
There are four functions for creating junction-objects from a range:
any_of, all_of, one_of and none_of and you can compre the objects with
one of the comparion operators (==,!=,<,<=,>,>=). You also can use
something different when you write:
any_of( a ).do_comparison( <Function object>, all_of( b ) ); The
function object exspected is bool(element_type,element_type) wheather
element_type is the type of a range element.
I also plan to implement something more similar to the perl junctions as
a extension of set-container. Who is interested? I think this needs
more discussion about the client interface and the implementation as the
comparisons.
Sincerly
Florian.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk