Boost logo

Boost :

From: Robert Kawulak (kawulak_at_[hidden])
Date: 2006-09-11 07:30:52


> From: Alexander Nasonov
>
> I recently wrote a proposal:
>
http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?SecureI
ntegerOperations

Hi!

I'm very glad someone is willing to address this problem, which seems
to be neglected. ;-)
  
You might want to take a look at SafeInt:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncod
e/html/secure01142004.asp
It takes a different approach, which IMO is more convenient in most
situations than the free functions, it defines a wrapper class
template which controls all the arithmetic operations of the
underlying type. The code is copyrighted and highly
platform-dependent, but I think that if Boost is going to have any
arithmetic operations checking mechanism, then it should rather look
like this.

Also, I think the interface containing a bunch of C-style set of
functions with arguments' types pushed into the functions' names is a
bit inadequate for a modern C++ library - it makes it very difficult
to use your library in a generic code, and it makes it easy to perform
unwanted argument conversions.

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