24 #ifndef PPL_Result_inlines_hh
25 #define PPL_Result_inlines_hh 1
27 #include "assertions.hh"
34 const unsigned res =
static_cast<unsigned>(x) & static_cast<unsigned>(y);
35 return static_cast<Result>(res);
41 const unsigned res =
static_cast<unsigned>(x) | static_cast<unsigned>(y);
42 return static_cast<Result>(res);
48 const Result y_neg =
static_cast<Result>(~static_cast<
unsigned>(y));
102 #endif // !defined(PPL_Result_inlines_hh)
A positive integer overflow occurred (rounding down).
int result_overflow(Result r)
Result
Possible outcomes of a checked arithmetic computation.
Negative infinity result class.
Result_Relation result_relation(Result r)
I_Result operator&(I_Result a, I_Result b)
Positive infinity result class.
Result_Class result_class(Result r)
The computed result is not representable.
Representable number result class.
I_Result operator|(I_Result a, I_Result b)
Result result_relation_class(Result r)
The entire library is confined to this namespace.
Enable_If< Is_Singleton< T >::value, Interval< B, Info > >::type operator-(const Interval< B, Info > &x, const T &y)
bool result_representable(Result r)
A negative integer overflow occurred (rounding up).