Bounded Integer: Header-only C++ library replaces integers, adds explicit bounds
1–10 of 130 posts
Re: Bounded Integer: Header-only C++ library replaces integers, adds explicit bounds
#2This must be some new definition of the word 'unusable.'
Re: Bounded Integer: Header-only C++ library replaces integers, adds explicit bounds
#3So when an overflow happens here I assume it's a compile time error (UB due to integer overflow in constexpr context must be diagnosed by the compiler). A handful of multiplications can get you there easily.
Re: Bounded Integer: Header-only C++ library replaces integers, adds explicit bounds
#4> The built-in integer types in C++ (int, unsigned, long long, etc.) are mostly unusable because of the lax requirements on bounds. This must be some new definition of the word 'unusable.'
Re: Bounded Integer: Header-only C++ library replaces integers, adds explicit bounds
#5> The built-in integer types in C++ (int, unsigned, long long, etc.) are mostly unusable because of the lax requirements on bounds. This must be some new definition of the word 'unusable.'
Re: Bounded Integer: Header-only C++ library replaces integers, adds explicit bounds
#6> The built-in integer types in C++ (int, unsigned, long long, etc.) are mostly unusable because of the lax requirements on bounds. This must be some new definition of the word 'unusable.'
Re: Bounded Integer: Header-only C++ library replaces integers, adds explicit bounds
#7> The built-in integer types in C++ (int, unsigned, long long, etc.) are mostly unusable because of the lax requirements on bounds. This must be some new definition of the word 'unusable.'
Re: Bounded Integer: Header-only C++ library replaces integers, adds explicit bounds
#8Re: Bounded Integer: Header-only C++ library replaces integers, adds explicit bounds
#9Re: Bounded Integer: Header-only C++ library replaces integers, adds explicit bounds
#10> The built-in integer types in C++ (int, unsigned, long long, etc.) are mostly unusable because of the lax requirements on bounds. This must be some new definition of the word 'unusable.'
If you work with formal verification this is a pretty common sight.