OpenTTD Source: src/core/overflowsafe_type.hpp File Reference

OpenTTD Source 13.2.1

Data Structures | Typedefs | Functions
overflowsafe_type.hpp File Reference
`#include "math_func.hpp"`
`#include <limits>`

Go to the source code of this file.

## Data Structures
class | OverflowSafeInt< T >
| Overflow safe template for integers, i.e. More...

## Typedefs
typedef OverflowSafeInt< int64 > | OverflowSafeInt64
typedef OverflowSafeInt< int32 > | OverflowSafeInt32

## Functions
template<class T >
constexpr OverflowSafeInt< T > | operator+ (const int64 a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator- (const int64 a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator* (const int64 a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator/ (const int64 a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator+ (const int a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator- (const int a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator* (const int a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator/ (const int a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator+ (const uint a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator- (const uint a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator* (const uint a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator/ (const uint a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator+ (const byte a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator- (const byte a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator* (const byte a, const OverflowSafeInt< T > b)
template<class T >
constexpr OverflowSafeInt< T > | operator/ (const byte a, const OverflowSafeInt< T > b)

## Detailed Description

An overflow safe integer-like type.

Definition in file overflowsafe_type.hpp.