|
sanisizer
Sanitize sizes to avoid integer overflow
|
Do not cast an integer in a function call. More...
#include <class.hpp>
Public Member Functions | |
| constexpr | Exact (Integer_ x) |
| constexpr | operator Integer_ () const |
| template<typename Output_ > | |
| constexpr | operator Output_ () const =delete |
Do not cast an integer in a function call.
| Integer_ | Type of the integer used in the call. |
Consider a function f(T x) for some (non-template) integer T. When calling this function on an integer y, we can use f(Exact(y)), which will throw a compile-time error if the type of y is not T.
|
inlineconstexpr |
| x | Integer value. |
|
inlineconstexpr |
x as an Integer_.
|
constexprdelete |
| Output_ | Type of the integer to be casted to. |
This is deleted so any attempt at a conversion will result in a compile-time error.