Bitcoin Core  27.99.0
P2P Digital Currency
Functions
overflow.h File Reference
#include <limits>
#include <optional>
#include <type_traits>
Include dependency graph for overflow.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class T >
bool AdditionOverflow (const T i, const T j) noexcept
 
template<class T >
std::optional< T > CheckedAdd (const T i, const T j) noexcept
 
template<class T >
SaturatingAdd (const T i, const T j) noexcept
 

Function Documentation

◆ AdditionOverflow()

template<class T >
bool AdditionOverflow ( const T  i,
const T  j 
)
noexcept

Definition at line 13 of file overflow.h.

Here is the caller graph for this function:

◆ CheckedAdd()

template<class T >
std::optional<T> CheckedAdd ( const T  i,
const T  j 
)
noexcept

Definition at line 24 of file overflow.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SaturatingAdd()

template<class T >
T SaturatingAdd ( const T  i,
const T  j 
)
noexcept

Definition at line 33 of file overflow.h.

Here is the caller graph for this function: