RAVENNAKIT
Loading...
Searching...
No Matches
safe_int.hpp File Reference
#include "ravennakit/core/expected.hpp"
#include <limits>

Go to the source code of this file.

Classes

class  rav::SafeInt< T >
 A safe integer type that checks for overflow and underflow when performing arithmetic operations. More...

Namespaces

namespace  rav

Typedefs

using rav::SafeInt8 = SafeInt<int8_t>
using rav::SafeInt16 = SafeInt<int16_t>
using rav::SafeInt32 = SafeInt<int32_t>
using rav::SafeInt64 = SafeInt<int64_t>
using rav::SafeUint8 = SafeInt<uint8_t>
using rav::SafeUint16 = SafeInt<uint16_t>
using rav::SafeUint32 = SafeInt<uint32_t>
using rav::SafeUint64 = SafeInt<uint64_t>

Enumerations

enum class  rav::SafeIntError { rav::overflow , rav::underflow , rav::div_by_zero }