File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 27
27
* - - MSTD_CONSTEXPR_XX_14 macros that can be used to mark
28
28
* things that are valid as constexpr only for C++14 or later,
29
29
* permitting constexpr use where ARM C 5 would reject it.
30
+ * - - MSTD_CONSTEXPR_XX_11 macros that can be used to permit
31
+ * constexpr alternatives for C.
30
32
*/
31
33
34
+ #if __cplusplus
35
+
32
36
#include <cstddef>
33
37
34
38
/* Macros that can be used to mark functions and objects that are
42
46
#define MSTD_CONSTEXPR_OBJ_14 const
43
47
#endif
44
48
49
+ #define MSTD_CONSTEXPR_FN_11 constexpr
50
+ #define MSTD_CONSTEXPR_OBJ_11 constexpr
51
+
45
52
#ifdef __CC_ARM
46
53
47
54
// [expr.alignof]
@@ -72,4 +79,13 @@ using std::max_align_t;
72
79
73
80
}
74
81
82
+ #else // __cplusplus
83
+
84
+ #define MSTD_CONSTEXPR_FN_14 inline
85
+ #define MSTD_CONSTEXPR_OBJ_14 const
86
+ #define MSTD_CONSTEXPR_FN_11 inline
87
+ #define MSTD_CONSTEXPR_OBJ_11 const
88
+
89
+ #endif // __cplusplus
90
+
75
91
#endif // MSTD_CSTDDEF_
You can’t perform that action at this time.
0 commit comments