Vita
Classes | Typedefs | Functions
vita::integer Namespace Reference

Integer overflow is undefined behaviour. More...

Classes

class  add
 
class  div
 
class  ife
 
class  ifl
 
class  ifz
 
class  mod
 
class  mul
 
class  number
 Integer ephemeral random constant. More...
 
class  shl
 
class  sub
 

Typedefs

using base_t = D_INT
 

Functions

base_t cast (const value_t &v)
 Just a simple shortcut. More...
 

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.

Typedef Documentation

◆ base_t

using vita::integer::base_t = typedef D_INT

Definition at line 37 of file int.h.

Function Documentation

◆ cast()

base_t vita::integer::cast ( const value_t v)
inline

Just a simple shortcut.

Parameters
[in]vthe value that must be casted to base type (base_t)

Definition at line 44 of file int.h.