#include <safe.hpp>
|
safe | operator+ (const safe &a, const safe &b) |
|
safe | operator- (const safe &a, const safe &b) |
|
safe | operator* (const safe &a, const safe &b) |
|
safe | operator/ (const safe &a, const safe &b) |
|
safe | operator% (const safe &a, const safe &b) |
|
bool | operator== (const safe &a, const safe &b) |
|
bool | operator== (const safe &a, const T &b) |
|
bool | operator== (const T &a, const safe &b) |
|
bool | operator< (const safe &a, const safe &b) |
|
bool | operator< (const safe &a, const T &b) |
|
bool | operator< (const T &a, const safe &b) |
|
bool | operator> (const safe &a, const safe &b) |
|
bool | operator> (const safe &a, const T &b) |
|
bool | operator> (const T &a, const safe &b) |
|
bool | operator!= (const safe &a, const safe &b) |
|
bool | operator!= (const safe &a, const T &b) |
|
bool | operator!= (const T &a, const safe &b) |
|
bool | operator<= (const safe &a, const safe &b) |
|
bool | operator<= (const safe &a, const T &b) |
|
bool | operator<= (const T &a, const safe &b) |
|
bool | operator>= (const safe &a, const safe &b) |
|
bool | operator>= (const safe &a, const T &b) |
|
bool | operator>= (const T &a, const safe &b) |
|
template<typename T>
struct fc::safe< T >
This type is designed to provide automatic checks for integer overflow and default initialization. It will throw an exception on overflow conditions.
It can only be used on built-in types.
Implemented using spec from: https://www.securecoding.cert.org/confluence/display/c/INT32-C.+Ensure+that+operations+on+signed+integers+do+not+result+in+overflow
Definition at line 20 of file safe.hpp.
◆ safe() [1/3]
template<typename T>
template<typename O >
◆ safe() [2/3]
◆ safe() [3/3]
◆ max()
◆ min()
◆ operator%=()
◆ operator*=()
◆ operator++() [1/2]
◆ operator++() [2/2]
◆ operator+=()
◆ operator-()
◆ operator--() [1/2]
◆ operator--() [2/2]
◆ operator-=()
◆ operator/=()
◆ operator!= [1/3]
◆ operator!= [2/3]
◆ operator!= [3/3]
◆ operator%
◆ operator*
◆ operator+
◆ operator-
◆ operator/
◆ operator< [1/3]
template<typename T>
bool operator< |
( |
const safe< T > & |
a, |
|
|
const safe< T > & |
b |
|
) |
| |
|
friend |
◆ operator< [2/3]
template<typename T>
bool operator< |
( |
const safe< T > & |
a, |
|
|
const T & |
b |
|
) |
| |
|
friend |
◆ operator< [3/3]
template<typename T>
bool operator< |
( |
const T & |
a, |
|
|
const safe< T > & |
b |
|
) |
| |
|
friend |
◆ operator<= [1/3]
template<typename T>
bool operator<= |
( |
const safe< T > & |
a, |
|
|
const safe< T > & |
b |
|
) |
| |
|
friend |
◆ operator<= [2/3]
template<typename T>
bool operator<= |
( |
const safe< T > & |
a, |
|
|
const T & |
b |
|
) |
| |
|
friend |
◆ operator<= [3/3]
template<typename T>
bool operator<= |
( |
const T & |
a, |
|
|
const safe< T > & |
b |
|
) |
| |
|
friend |
◆ operator== [1/3]
template<typename T>
bool operator== |
( |
const safe< T > & |
a, |
|
|
const safe< T > & |
b |
|
) |
| |
|
friend |
◆ operator== [2/3]
template<typename T>
bool operator== |
( |
const safe< T > & |
a, |
|
|
const T & |
b |
|
) |
| |
|
friend |
◆ operator== [3/3]
template<typename T>
bool operator== |
( |
const T & |
a, |
|
|
const safe< T > & |
b |
|
) |
| |
|
friend |
◆ operator> [1/3]
template<typename T>
bool operator> |
( |
const safe< T > & |
a, |
|
|
const safe< T > & |
b |
|
) |
| |
|
friend |
◆ operator> [2/3]
template<typename T>
bool operator> |
( |
const safe< T > & |
a, |
|
|
const T & |
b |
|
) |
| |
|
friend |
◆ operator> [3/3]
template<typename T>
bool operator> |
( |
const T & |
a, |
|
|
const safe< T > & |
b |
|
) |
| |
|
friend |
◆ operator>= [1/3]
template<typename T>
bool operator>= |
( |
const safe< T > & |
a, |
|
|
const safe< T > & |
b |
|
) |
| |
|
friend |
◆ operator>= [2/3]
template<typename T>
bool operator>= |
( |
const safe< T > & |
a, |
|
|
const T & |
b |
|
) |
| |
|
friend |
◆ operator>= [3/3]
template<typename T>
bool operator>= |
( |
const T & |
a, |
|
|
const safe< T > & |
b |
|
) |
| |
|
friend |
◆ value
The documentation for this struct was generated from the following file: