uTL
micro Template library
version.h
Go to the documentation of this file.
1 
21 #ifndef __utl_core_version_h__
22 #define __utl_core_version_h__
23 
27 
29 #define UTL_VERSION "0.1.0"
30 #define UTL_VERSION_MAJOR 0
31 #define UTL_VERSION_MINOR 1
32 #define UTL_VERSION_PATCH 0
33 #define UTL_VERSION_VALUE ( (UTL_VERSION_MAJOR * 10000) \
34  + (UTL_VERSION_MINOR * 100) \
35  + UTL_VERSION_PATCH)
36 
38 #define CXX_VER __cplusplus
39 #define CXX_VER_STD_11 201103L
40 #define CXX_VER_STD_14 201402L
41 #define CXX_VER_STD_17 201703L
42 
44 #ifndef CXX_VARIABLE_TEMPLATES
45  #ifdef __cpp_variable_templates
46  #define CXX_VARIABLE_TEMPLATES __cpp_variable_templates
47  #else
48  #define CXX_VARIABLE_TEMPLATES (CXX_VER >= CXX_VER_STD_14)
49  #endif
50 #endif
51 
53 #ifndef CXX_CONCEPTS
54  #ifdef __cpp_concepts
55  #define CXX_CONCEPTS __cpp_concepts
56  #else
57  #define CXX_CONCEPTS 0
58  #endif
59 #endif
60 
62 #ifndef CXX_INLINE_VARIABLES
63  #ifdef __cpp_inline_variables
64  #define CXX_INLINE_VARIABLES __cpp_inline_variables
65  #else
66  #define CXX_INLINE_VARIABLES (CXX_VER >= CXX_VER_STD_17)
67  #endif
68 #endif
69 
70 #ifndef CXX_FOLD_EXPRESSIONS
71  #ifdef __cpp_fold_expressions
72  #define CXX_FOLD_EXPRESSIONS __cpp_fold_expressions
73  #else
74  #define CXX_FOLD_EXPRESSIONS (CXX_VER >= CXX_VER_STD_17)
75  #endif
76 #endif
77 
78 /*
79  * Workaround inspections
80  */
81 #if defined(__GNUC__) && (__GNUC__ < 5)
82  // https://wg21.link/cwg1558
83  #define UTL_WORKAROUND_CWG_1558
84 #endif
85 
86 
88 #if CXX_VER < CXX_VER_STD_14
89 #error "uTL requires C++14"
90 #endif
91 
93 #endif /* #ifndef __utl_core_version_h__ */