|
OpenTTD Source 20260218-master-g2123fca5ea
|
An overflow safe integer-like type. More...
#include "math_func.hpp"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_t > | OverflowSafeInt64 |
| typedef OverflowSafeInt< int32_t > | OverflowSafeInt32 |
Functions | |
| template<class T> | |
| constexpr OverflowSafeInt< T > | operator+ (const int64_t a, const OverflowSafeInt< T > b) |
| template<class T> | |
| constexpr OverflowSafeInt< T > | operator- (const int64_t a, const OverflowSafeInt< T > b) |
| template<class T> | |
| constexpr OverflowSafeInt< T > | operator* (const int64_t a, const OverflowSafeInt< T > b) |
| template<class T> | |
| constexpr OverflowSafeInt< T > | operator/ (const int64_t 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 uint8_t a, const OverflowSafeInt< T > b) |
| template<class T> | |
| constexpr OverflowSafeInt< T > | operator- (const uint8_t a, const OverflowSafeInt< T > b) |
| template<class T> | |
| constexpr OverflowSafeInt< T > | operator* (const uint8_t a, const OverflowSafeInt< T > b) |
| template<class T> | |
| constexpr OverflowSafeInt< T > | operator/ (const uint8_t a, const OverflowSafeInt< T > b) |
| template<typename To, typename From> | |
| constexpr To | ClampTo (OverflowSafeInt< From > value) |
An overflow safe integer-like type.
Definition in file overflowsafe_type.hpp.
| typedef OverflowSafeInt<int32_t> OverflowSafeInt32 |
Definition at line 208 of file overflowsafe_type.hpp.
| typedef OverflowSafeInt<int64_t> OverflowSafeInt64 |
Definition at line 207 of file overflowsafe_type.hpp.
|
constexpr |
Definition at line 218 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 192 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 186 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 198 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 204 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 190 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 184 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 196 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 202 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 191 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 185 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 197 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 203 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 193 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 187 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 199 of file overflowsafe_type.hpp.
|
inlineconstexpr |
Definition at line 205 of file overflowsafe_type.hpp.