LibreOffice Module o3tl (master) 1
Namespaces | Macros | Functions
safeint.hxx File Reference
#include <sal/config.h>
#include <algorithm>
#include <cassert>
#include <limits>
#include <type_traits>
Include dependency graph for safeint.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  o3tl
 

Macros

#define __has_builtin(x)   0
 

Functions

template<typename T >
constexpr T o3tl::saturating_add (T a, T b)
 
template<typename T >
constexpr T 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)
 
template<typename T1 , typename T2 >
constexpr std::enable_if_t< std::is_unsigned_v< T1 >, T1 > o3tl::clamp_to_unsigned (T2 value)
 
template<typename T1 , typename T2 >
constexpr T1 o3tl::narrowing (T2 value)
 
template<typename T >
o3tl::sanitizing_min (T a, T b)
 

Macro Definition Documentation

◆ __has_builtin

#define __has_builtin (   x)    0

Definition at line 23 of file safeint.hxx.