acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
number_limits.h
1#pragma once
2
3
4#include <limits.h>
5
6
7template < prototype_integral INTEGRAL >
8inline bool fits_int(INTEGRAL i)
9{
10
11 if (::comparison::comparison2 < INTEGRAL, ::i32 >().order(i, I32_MAXIMUM) > 0)
12 {
13
14 return false;
15
16 }
17
18 if (::comparison::comparison2 < INTEGRAL, ::i32 >().order(i, I32_MINIMUM) < 0)
19 {
20
21 return false;
22
23 }
24
25 return true;
26
27}
28
29
30