]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/safe_numerics/example/example81.cpp
3 #include <boost/safe_numerics/safe_integer.hpp>
4 #include <boost/safe_numerics/exception_policies.hpp> // include exception policies
6 using safe_t
= boost::safe_numerics::safe
<
8 boost::safe_numerics::native
,
9 boost::safe_numerics::loose_trap_policy
// note use of "loose_trap_exception" policy!
12 int main(int argc
, const char * argv
[]){
13 std::cout
<< "example 81:\n";
16 safe_t z
= x
+ y
; // will fail to compile !