CNL  2.0.2 (development)
Compositional Numeric Library
types.h
Go to the documentation of this file.
1 
2 // Copyright John McFarlane 2021.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file ../LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 
9 
10 #if !defined(CNL_IMPL_CSTDINT_TYPES_H)
11 #define CNL_IMPL_CSTDINT_TYPES_H
12 
13 #include "../config.h"
14 
15 #include <cstdint>
16 
18 namespace cnl {
19 #if defined(CNL_INT128_ENABLED)
20  // to disable 128-bit integer support, #define CNL_USE_INT128=0
21  using int128_t = __int128;
22  using uint128_t = unsigned __int128;
23 
24  using intmax_t = int128_t;
25  using uintmax_t = uint128_t;
26 #else
27  using intmax_t = std::intmax_t;
28  using uintmax_t = std::uintmax_t;
29 #endif // defined(CNL_INT128_ENABLED)
30 }
31 
32 #endif // CNL_IMPL_CSTDINT_TYPES_H
std::intmax_t
cnl
compositional numeric library
Definition: abort.h:15