This library contains code that extends and simplifies different operations
for C language based programs.
Revisión | 744f48c49ba401fdf08d0529ba864f1acf148cf0 (tree) |
---|---|
Tiempo | 2022-02-10 07:23:23 |
Autor | Sergey Gusarov <laborer2008@gmai...> |
Commiter | Sergey Gusarov |
Added detect of CXX20 and CXX23 standards
@@ -1,4 +1,4 @@ | ||
1 | 1 | f7e63ef13448899bf99322d3bef4696b8597e170 cmake/cmake_tools |
2 | 2 | 5013d507802becd2c434d4dbdafad45c3da5ef23 include/ctools/std/msinttypes |
3 | -06beda7c7cf3133dc256db280a0feb22b129f49f pyrepo | |
3 | +463a0e69fbc86ba03df16f8957d08fec6f40bbbb pyrepo | |
4 | 4 | c3d7662a1e692aa0934fa61a2a67229f3b73a5a2 tests/unity |
@@ -76,11 +76,29 @@ | ||
76 | 76 | # error CT_LANG_CXX17 must be undefined |
77 | 77 | #endif |
78 | 78 | |
79 | -#if defined (__cplusplus) && (__cplusplus > 201402L) | |
79 | +#if defined (__cplusplus) && (__cplusplus >= 201703L) | |
80 | 80 | # define CT_LANG_CXX17 |
81 | 81 | #endif |
82 | 82 | |
83 | 83 | |
84 | +#ifdef CT_LANG_CXX20 | |
85 | +# error CT_LANG_CXX20 must be undefined | |
86 | +#endif | |
87 | + | |
88 | +#if defined (__cplusplus) && (__cplusplus >= 202002L) | |
89 | +# define CT_LANG_CXX20 | |
90 | +#endif | |
91 | + | |
92 | + | |
93 | +#ifdef CT_LANG_CXX23 | |
94 | +# error CT_LANG_CXX23 must be undefined | |
95 | +#endif | |
96 | + | |
97 | +#if defined (__cplusplus) && (__cplusplus > 202002L) | |
98 | +# define CT_LANG_CXX23 | |
99 | +#endif | |
100 | + | |
101 | + | |
84 | 102 | #ifdef CT_LANG_OBJC |
85 | 103 | # error CT_LANG_OBJC must be undefined |
86 | 104 | #endif |
@@ -41,11 +41,15 @@ | ||
41 | 41 | int a = 5; |
42 | 42 | #elif defined (CT_LANG_CXX17) |
43 | 43 | int a = 6; |
44 | +#elif defined (CT_LANG_CXX20) | |
45 | + int a = 7; | |
46 | +#elif defined (CT_LANG_CXX23) | |
47 | + int a = 8; | |
44 | 48 | #elif defined (CT_LANG_OBJC) |
45 | - int a = 7; | |
49 | + int a = 9; | |
46 | 50 | #elif defined (CT_COMPL_MSVC) || defined (CT_COMPL_BCC) |
47 | 51 | // These compilers don't support some of above mentioned standards |
48 | - int a = 8; | |
52 | + int a = 10; | |
49 | 53 | #endif |
50 | 54 | |
51 | 55 | CT_UNUSED(a); |