simdutf 6.1.1
Unicode at GB/s.
Loading...
Searching...
No Matches
compiler_check.h
1#ifndef SIMDUTF_COMPILER_CHECK_H
2#define SIMDUTF_COMPILER_CHECK_H
3
4#ifndef __cplusplus
5 #error simdutf requires a C++ compiler
6#endif
7
8#ifndef SIMDUTF_CPLUSPLUS
9 #if defined(_MSVC_LANG) && !defined(__clang__)
10 #define SIMDUTF_CPLUSPLUS (_MSC_VER == 1900 ? 201103L : _MSVC_LANG)
11 #else
12 #define SIMDUTF_CPLUSPLUS __cplusplus
13 #endif
14#endif
15
16// C++ 23
17#if !defined(SIMDUTF_CPLUSPLUS23) && (SIMDUTF_CPLUSPLUS >= 202302L)
18 #define SIMDUTF_CPLUSPLUS23 1
19#endif
20
21// C++ 20
22#if !defined(SIMDUTF_CPLUSPLUS20) && (SIMDUTF_CPLUSPLUS >= 202002L)
23 #define SIMDUTF_CPLUSPLUS20 1
24#endif
25
26// C++ 17
27#if !defined(SIMDUTF_CPLUSPLUS17) && (SIMDUTF_CPLUSPLUS >= 201703L)
28 #define SIMDUTF_CPLUSPLUS17 1
29#endif
30
31// C++ 14
32#if !defined(SIMDUTF_CPLUSPLUS14) && (SIMDUTF_CPLUSPLUS >= 201402L)
33 #define SIMDUTF_CPLUSPLUS14 1
34#endif
35
36// C++ 11
37#if !defined(SIMDUTF_CPLUSPLUS11) && (SIMDUTF_CPLUSPLUS >= 201103L)
38 #define SIMDUTF_CPLUSPLUS11 1
39#endif
40
41#ifndef SIMDUTF_CPLUSPLUS11
42 #error simdutf requires a compiler compliant with the C++11 standard
43#endif
44
45#endif // SIMDUTF_COMPILER_CHECK_H