Boost logo

Boost :

Subject: Re: [boost] [review][constrained_value] Review of Constrained ValueLibrary begins today
From: Robert Kawulak (robert.kawulak_at_[hidden])
Date: 2008-12-06 07:40:37

> From: vicente.botet

> what do you think about replacing the typedef by a specific
> class so instead of writing
> bounded<int>::type v;
> we write
> bounded<int> v;

I was already thinking about this, but I'm not sure if this is that good idea.

> The advantage to have a specific class (see below) is that it
> allows to add specific members that have a sens, e. g.
> change_lower_bound can be added to bounded<int, int, int> but
> not to bounded_int<int, 0, 100>.

OTOH the classes will have members that make no sense in some cases, e.g.
change_bounds_inclusion for clipping (assuming it will derive from bounded,
otherwise the other useful functions would have to be duplicated in both
classes). Therefore I'd rather stick with the current solution to avoid defining
six classes with lots of constructors and many identical members...


Boost list run by bdawes at, gregod at, cpdaniel at, john at