From: Stjepan Rajko (stipe_at_[hidden])
Date: 2008-06-19 15:01:47
On Wed, Jun 18, 2008 at 1:33 PM, Youssef Oujamaa
> My mentor and I are working on a safe variable template class this
> summer in the spirit of the GSOC even though we where not selected to
> get any funds for it. We would like to know what our fellow boost/c++
> developers would like to see in a safe variable template class and
> what not, you can see what we are aiming for in the document bellow.
Kudos on your decision! I briefly looked at your proposal and it
seems like a useful project. I have a few comments for you:
* SafeVariable seems like a good name for the library (or maybe even
SafeValue?), but for the class template itself why not just 'safe'?
So you have safe<int>, safe<double>, etc...
* I really like that you're making both static and dynamic versions.
* boost programming guidelines say to avoid exception specifications
in code (http://www.boost.org/development/requirements.html#Exception-specification),
but I'm not familiar with the specifics of exception specification,
and maybe in your case it doesn't hurt.
* The operators lib might be useful to you
you might know this already
* returning things by value (e.g., from min and max) might be OK for
types like int and double, but for more heavy class types you may want
to return by const & . Except for the static version, where I guess
you have to return by value (or by && in C++0x). The call traits
library might have something to help give you the right return type
for the dynamic version.
* is there / should there be any overlap between a safe value and a
bounded value library (e.g., when you want the value to wrap on
overflow etc.)? I noticed you allow customization of overflow
behavior so maybe this is something you have in mind?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk