LibreOffice Module o3tl (master)  1
Namespaces | Macros | Functions
safeint.hxx File Reference
#include <sal/config.h>
#include <cassert>
#include <limits>
#include <type_traits>
Include dependency graph for safeint.hxx:

Go to the source code of this file.

Namespaces

 o3tl
 

Macros

#define __has_builtin(x)   0
 

Functions

template<typename T >
std::enable_if< std::is_signed< T >::value, T >::type o3tl::saturating_add (T a, T b)
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, T >::type o3tl::saturating_add (T a, T b)
 
template<typename T >
std::enable_if< std::is_signed< T >::value, T >::type o3tl::saturating_sub (T a, T b)
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, T >::type o3tl::saturating_sub (T a, T b)
 
template<typename T >
std::enable_if< std::is_signed< T >::value, T >::type o3tl::saturating_toggle_sign (T a)
 
template<typename T >
std::enable_if< std::is_signed< T >::value, bool >::type o3tl::checked_multiply (T a, T b, T &result)
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, bool >::type o3tl::checked_multiply (T a, T b, T &result)
 
template<typename T >
std::enable_if< std::is_signed< T >::value, bool >::type o3tl::checked_add (T a, T b, T &result)
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, bool >::type o3tl::checked_add (T a, T b, T &result)
 
template<typename T >
std::enable_if< std::is_signed< T >::value, bool >::type o3tl::checked_sub (T a, T b, T &result)
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, bool >::type o3tl::checked_sub (T a, T b, T &result)
 
template<typename T >
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > o3tl::make_unsigned (T value)
 

Macro Definition Documentation

#define __has_builtin (   x)    0

Definition at line 23 of file safeint.hxx.