Subject: Re: [boost] [constrained_value] Constrained Value review results
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2010-10-06 13:20:41
> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]]
> On Behalf Of Thorsten Ottosen
> Sent: Wednesday, October 06, 2010 2:21 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] [constrained_value] Constrained Value review results
> Den 06-10-2010 14:46, Christian Holmquist skrev:
> > On 5 October 2010 20:43, Robert Kawulak<robert.kawulak_at_[hidden]>
> >> Hello All,
> >> As Gordon Woodhull has suggested, it'd be nice to try finding a
> >> better name for bounded_int:
> >>> The unique characteristic of this class is not that it's bounded or
> >>> an
> >> int, but that the bounds are
> >>> specified at compile time.
> > I think bounded_int or bounded_integral seems just fine. The class'
> > compile time parameters and runtime parameters I assume the user can
> > find in the documentation. From the header synopsis you gave in
> > previous post it was already quite clear the interface.
> bounded_int and bounded_float is fine with me too. Since the library is
> constrained_value, contrained_int and constrained_float would be fine too.
Although most of the types are integral rather than floats, _int or
_integral feels misleading.
Doesn't the template parameter tell you the type? (If you care).
I also like the word 'static' - it implies 'fixed at compile time' to me,
but I agree static has other possible implications.
fixed_bound is my suggestion, FWIW.
fixed_bound<int, 0, 23>::type hour;
--- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk