Boost logo

Boost :

From: Robert Kawulak (kawulak_at_[hidden])
Date: 2005-09-25 18:02:25


Hi,

> Restricted is ok, but I like constrained better. Please see:
>
> http://www.boost.org/doc/html/constrained_value.html
> http://www.boost.org/boost/date_time/constrained_value.hpp
> http://www.artima.com/weblogs/viewpost.jsp?thread=79470
>
> Jeff

Thank you very much for the links, they inspired me to think deeply about
the design of my class once again :). What I meant to create was pretty
similar to constrained_value, only more complex, more general and maybe a
little more efficient.

BTW, constrained_value of Christofer Diggins has at least one 'bug' - it has
a default constructor which default-initialises the value, and doesn't check
if this default value conforms to the constraints. I also believe, that it'd
be better to supply operator const value() than operator value() - this
conversion is implicit so the const version would be safer.

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