SafeInt<int64_t> v = pow(2.0, 63.0) doesn't throw

The following code produces an overflow but doesn't throw: SafeInt<int64_t> v = pow(2.0, 63.0); For an explanation, see http://stackoverflow.com/a/30424410/1956010

Id #17676 | Release: None | Updated: Jun 6 at 7:07 PM by nwellnhof | Created: Jun 6 at 7:07 PM by nwellnhof

The address operator(&) overload breaks basic expectation from SafeInt<T,E> class

I posted this question on a forum in MSDN [Prev question] (https://social.msdn.microsoft.com/Forums/vstudio/en-US/751fd20b-896e-494c-953e-a618b8cf5247/why-was-the-address-operator-overloaded-in-saf...

Id #17629 | Release: None | Updated: Mar 17 at 5:31 PM by pbhagav | Created: Mar 17 at 5:30 PM by pbhagav

Fix Run-Time Check Failure

It's kind of ironic to have a Run-Time Check Failure #1 - A cast to a smaller data type has caused a loss of data. Am I the only one that enables all runtime checks in Visual Studio? I have made t...

Id #17327 | Release: None | Updated: Mar 14, 2015 at 2:18 AM by dcleblanc | Created: Jan 26, 2015 at 2:08 PM by florin_crisan

All downloads appear broken

All downloads appear to contain only some xaml files: BuildProcessTemplates/DefaultTemplate.11.1.xaml BuildProcessTemplates/DefaultTemplate.xaml BuildProcessTemplates/LabDefaultTemplate.11.xaml B...

Id #16816 | Release: None | Updated: May 7, 2014 at 8:49 PM by dcleblanc | Created: Apr 22, 2014 at 8:38 AM by sehe

nullptr and /CLR

Using Visual Studio 2008 , it is not possible to include the header in mixed CLR and native code because of the definition of nullptr clashes with CLR usage.   Given there is only one use of nullpt...

Id #15237 | Release: None | Updated: Feb 14, 2013 at 1:31 AM by KeithBurton | Created: May 31, 2012 at 6:58 AM by KeithBurton

integer overflows

I've been tracking down some integer overflows in Firefox and seem to have narrowed some of them down to the SafeInt library.   As an example, the "a = -a;" assignment at SafeInt3.hpp:2102 is somet...

Id #14278 | Release: None | Updated: Feb 14, 2013 at 1:31 AM by noloader | Created: Sep 21, 2011 at 8:32 PM by regehr

IntrinsicMultiplyUint64 and IntrinsicMultiplyInt64 missing "inline" keyword

VS 2010 gives a linker error:   Error 95 error LNK2005: "bool __cdecl IntrinsicMultiplyUint64(unsigned __int64 const &,unsigned __int64 const &,unsigned __int64 *)" (?IntrinsicMultiplyUint64@@YA_NA...

Id #13029 | Release: None | Updated: Feb 14, 2013 at 1:31 AM by dcleblanc | Created: Feb 16, 2011 at 7:40 PM by kgriffs

bug gcc 4.3.2 and 4.4.1 int64_t

i try to use multiply on int64_t   boost::int64_t a=2; boost::int64_t b=3; boost::int64_t c; SafeMultiply<boost::int64_t,boost::int64_t>(a,b,c);   gcc 4.3.2 and 4.4.1 takes compile time err...

Id #8791 | Release: SafeInt 3.0.13 | Updated: Jun 14, 2013 at 6:46 AM by dcleblanc | Created: Sep 16, 2009 at 11:11 AM by stuav

Potential performance gain from non-member operator+

Hi David,   I very much enjoyed your show at http://channel9.msdn.com, together with Ale Contenti, and I'm glad to hear that SafeInt is doing so well at Microsoft.   You have clearly put a lot of e...

Id #7910 | Release: None | Updated: Feb 14, 2013 at 1:31 AM by Niels_Dekker | Created: Jun 19, 2009 at 11:03 PM by Niels_Dekker

Need to use standard defines for GCC, remove warnings from test rig

Switch to #ifdef GNUC, suppress warnings from test rig, try seeing if we can raise warning level to -Wall.

Id #6711 | Release: None | Updated: Feb 14, 2013 at 1:31 AM by dcleblanc | Created: Dec 3, 2008 at 5:51 PM by dcleblanc