]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/safe_numerics/example/example18.cpp
1 #include <boost/safe_numerics/safe_integer.hpp>
2 #include <boost/safe_numerics/safe_integer_literal.hpp>
4 using namespace boost::safe_numerics
;
11 using safe_literal
= safe_signed_literal
<N
, native
, loose_trap_policy
>;
15 f(x
); // OK - implicit conversion to int
16 const safe_literal
<97> y
;
17 f(y
); // OK - y is a type with min/max = 97;