Boost logo

Boost :

Subject: Re: [boost] [constrained_value] Constrained Value review results
From: Robert Kawulak (robert.kawulak_at_[hidden])
Date: 2010-10-28 19:21:20


> From: vicente.botet
> I was wondering whether the library could not define some more generic logical and comparison
> constraints so we can do
>
> constrained<int, and_<greater_equal<int_<-10> >, less_equal<int_<10> > > >
> constrained<int, and_<greater_equal<ratio<1,4> >, less_equal<ratio<1,2> > > >
> constrained<int, and_<greater_equal<int_<0> >, less_equal<big_prime > > >
> constrained<int, and_<greater<int_<0> >, less_equal<int_<10> > > >

Similar thing, but based on lambdas, was already suggested by Gordon Woodhull and Stjepan Rajko was attempting to do this with
Boost.Phoenix. I don't know if this functionality is already included in that library. That's the discussion:

http://groups.google.com/group/boostusers/browse_thread/thread/91e63d27da5bd151/ab9fce0cf54e59f4

Best regards,
Robert


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk