fixed_point (deprecated)
rev.2
Binary Fixed-Point Arithmetic Library in C++
sg14
bits
config.h
1
2
// Copyright John McFarlane 2016.
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
7
#ifndef SG14_CONFIG_H
8
#define SG14_CONFIG_H
9
11
// SG14_INT128_ENABLED macro definition
12
13
#if defined(SG14_INT128_ENABLED)
14
#error SG14_INT128_ENABLED already defined
15
#endif
16
17
#if defined(SG14_USE_INT128)
18
19
// GCC/Clang 64-bit builds support 128-bit integer through __int128 type
20
#if defined(__SIZEOF_INT128__)
21
#define SG14_INT128_ENABLED
22
using
SG14_INT128 = __int128;
23
using
SG14_UINT128 =
unsigned
__int128;
24
#endif
25
26
#endif // defined(SG14_USE_INT128)
27
29
// SG14_EXCEPTIONS_ENABLED macro definition
30
31
#if defined(SG14_EXCEPTIONS_ENABLED)
32
#error SG14_EXCEPTIONS_ENABLED already defined
33
#endif
34
35
#if defined(_MSC_VER)
36
#if defined(_CPPUNWIND)
37
#define SG14_EXCEPTIONS_ENABLED
38
#endif
39
#elif defined(__clang__) || defined(__GNUG__)
40
#if defined(__EXCEPTIONS)
41
#define SG14_EXCEPTIONS_ENABLED
42
#endif
43
#else
44
#define SG14_EXCEPTIONS_ENABLED
45
#endif
46
47
#endif // SG14_CONFIG_H
Generated by
1.8.13