Bitcoin Core  22.99.0
P2P Digital Currency
Functions
overflow.h File Reference
#include <limits>
#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
 

Function Documentation

◆ AdditionOverflow()

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

Definition at line 12 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 23 of file overflow.h.

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