sanisizer
Sanitize sizes to avoid integer overflow
Loading...
Searching...
No Matches
attest.hpp File Reference

Create compile-time attestations. More...

#include <limits>
#include <type_traits>
#include <cassert>
#include <stdexcept>
#include "utils.hpp"

Go to the source code of this file.

Classes

struct  sanisizer::Attestation< Integer_, max_ >
 Attest to additional compile-time properties of an integer. More...
 
struct  sanisizer::is_Attestation< Value_ >
 
struct  sanisizer::is_Attestation< Attestation< Integer_, max_ > >
 
struct  sanisizer::is_integral_or_Attestation< Value_ >
 

Namespaces

namespace  sanisizer
 Sanitize sizes to avoid integer overflow.
 

Functions

template<typename Value_ >
constexpr auto sanisizer::get_value (Value_ x)
 
template<typename Value_ >
constexpr auto sanisizer::get_max ()
 
template<typename Max_ , Max_ new_max_, typename Value_ >
constexpr auto sanisizer::attest_max (Value_ x)
 
template<typename Max_ , typename Value_ >
constexpr auto sanisizer::attest_max_by_type (Value_ x)
 
template<typename Dest_ , typename Value_ >
constexpr bool sanisizer::check_overflow (Value_ x)
 

Detailed Description

Create compile-time attestations.