My Project
|
#include <SDBM.h>
Public Member Functions | |
IntInfty (int64_t v) | |
IntInfty & | operator= (int64_t v) |
int64_t | getValue () const |
operator int64_t () const | |
bool | isFinite () |
Static Public Member Functions | |
static IntInfty | infinity () |
Static Public Attributes | |
static constexpr int64_t | infty = std::numeric_limits<int64_t>::max() |
A utility class for SDBM to represent an integer with potentially infinite positive value. This uses the largest value of int64_t to represent infinity and redefines the arithmetic operators so that the infinity "saturates": inf + x = inf, inf - x = inf. If a sum of two finite values reaches the largest value of int64_t, the behavior of IntInfty is undefined (in practice, it asserts), similarly to regular signed integer overflow.
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inlineexplicit |
|
inline |
|
static |