We should be able to emulate an integer safety profile doing something like this:
#include <cstdint>
#include <boost/safe_numbers.hpp>
#ifndef BOOST_SAFE_NUMBERS_INTEGER_SAFETY_PROFILE
namespace not_std {
Using uint8_t = std::uint8_t;
Using uint16_t = std::uint16_t;
...
}
#else
Namespace not_std {
Using uint8_t = boost::safe_numbers::u8;
Using uint16_t = boost::safe_numbers::u16;
}
#endif
And then we can write out an example where the example compiles with or without the safety profile, but the actual result is different because a real error was caught.
We should be able to emulate an integer safety profile doing something like this:
And then we can write out an example where the example compiles with or without the safety profile, but the actual result is different because a real error was caught.