Subject: Re: [boost] [review][constrained_value] Bounded value
From: Edward Diener (eldiener_at_[hidden])
Date: 2008-12-03 22:51:30
Robert Kawulak wrote:
>> From: Edward Diener
>> I am hoping that you see a use for multi-bounds constraints
>> without the
>> need to provide predicates. A predicate is much more flexible but a
>> non-predictae syntax for multi-bound constraints can be much
>> easier and
>> quicker for the end user to specify.
> Predicates are the central part of the design of the library and this is rather
> not going to change. Even if the library would provide support for multi-bounded
> objects, the constraint would be implemented as a predicate, just like it is in
> the case of bounded objects right now.
I meant that the user should not have to specify his own predicate in
order to get multi-bounded objects just as the user does not have to
specify his own predicate to get bounded objects.
> BTW, I don't think that the syntax for providing an arbitrary number of bounds
> at compile time would be attractive, not to say easy for the users... At least
> not until we have compilers supporting variadic templates.
I agree completely. I realized that without variadic templates
multi-bounded objects would probably need a constructor taking the
bounds rather than as template parameters.
>> The idea of a
>> multi-bounded constraint is that the set of valid values
>> should be able
>> to encompass any value for that type
> I really have no idea what you wanted to say here...
Only that the notation for a multi-bounded constraint should allow any
number of single bounds.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk