This project is read-only.

SafeInt 3.0.18

Rating:        Based on 1 rating
Reviewed:  0 reviews
Downloads: 1585
Released: Dec 3, 2014
Updated: Oct 23, 2017 by dcleblanc
Dev status: Stable Help Icon


Source Code SafeInt.hpp
source code, 237K, uploaded Dec 3, 2014 - 1585 downloads

Release Notes

I haven't completed moving the code, but this project will be moving to:

This release provides more complete support for both clang and gcc, as well as beginning to use some C++11 features.

It compiles cleanly at:

Visual Studio - /Wall
gcc - /Wall
clang -Weverything

Substantial work has been done to ensure that all three top-tier compilers work well, and the conditional compilations only apply to the intended compiler.

A compromise was made to allow an enum type to be used as an argument to a SafeInt instance - if type_traits is included, that is now used to determine if something is an int or an enum.

In addition, people doing cross-platform work may have encountered some difficulties due to the Visual Studio version of SafeInt being somewhat different than this version. This new version can be used as a drop-in replacement for the Visual Studio version with just a few defines set. I would encourage users to standardize on the CodePlex version going forward.

Updates from previous beta version:

1) clang will sometimes pretend to be either Visual Studio and/or gcc, so check it first, then gcc, and finally Visual Studio, which never pretends to be clang.

2) Allow the conditional throw decoration to be more configurable until we full support conditional noexcept.

Very minor updates to allow better attribute marking on gcc and clang.

Many thanks to Tomasz Kukielka for all of his help with this update.

Reviews for this release