Ultra 0.9.4
Loading...
Searching...
No Matches
ultra::integer Namespace Reference

Classes

class  number
class  literal
class  add
class  div
class  ife
class  ifl
class  ifz
class  mod
class  mul
class  shl
class  sub

Functions

D_INT base (const value_t &v)

Detailed Description

Integer overflow is undefined behaviour. This means that implementations have a great deal of latitude in how they deal with signed integer overflow. An implementation that defines signed integer types as being modulo, for example, need not detect integer overflow. Implementations may also trap on signed arithmetic overflows, or simply assume that overflows will never happen and generate object code accordingly. For these reasons, it is important to ensure that operations on signed integers do no result in signed overflow.

Function Documentation

◆ base()

D_INT ultra::integer::base ( const value_t & v)
inlinenodiscard

A simple shortcut for extracting a D_INT from a value_t

Parameters
[in]vthe value_t containing the integer value
Returns
the value of v