|
3 | 3 | #include <rsl/_impl/macro/compiler.hpp> |
4 | 4 | #include <rsl/_impl/macro/opt.hpp> |
5 | 5 | #include <rsl/_impl/macro/os.hpp> |
| 6 | +#include <rsl/_impl/macro/compat.hpp> |
6 | 7 | #include <rsl/_impl/macro/loop.hpp> |
7 | 8 | #include <rsl/_impl/macro/diagnostic.hpp> |
8 | 9 |
|
9 | 10 | // compile environment checks |
10 | 11 |
|
11 | 12 | /** |
12 | | - * @param compiler: one of UNKNOWN, CLANG, GCC, MSVC |
| 13 | + * @param compiler one of UNKNOWN, CLANG, GCC, MSVC |
13 | 14 | */ |
14 | 15 | #define $compiler_is(compiler) (RSL_COMPILER == RSL_COMPILER_##compiler) |
15 | 16 |
|
16 | 17 | /** |
17 | | - * @param stdlib: one of UNKNOWN, LIBCXX, GLIBCXX, MSVC |
| 18 | + * @param stdlib one of UNKNOWN, LIBCXX, GLIBCXX, MSVC |
18 | 19 | */ |
19 | 20 | #define $stdlib_is(stdlib) (RSL_STDLIB == RSL_STDLIB_##stdlib) |
20 | 21 |
|
21 | 22 | /** |
22 | | - * @param os: one of UNKNOWN, WINDOWS, LINUX, MAC, FREEBSD, ANDROID, IOS |
| 23 | + * @param os one of UNKNOWN, WINDOWS, LINUX, MAC, FREEBSD, ANDROID, IOS |
23 | 24 | */ |
24 | 25 | #define $os_is(os) (RSL_OS == RSL_OS_##os) |
25 | 26 |
|
26 | | -/// feature macro helper |
| 27 | +/// Feature macro helper |
27 | 28 | #define $uses_opt(x) USES_OPT(x) |
28 | 29 |
|
29 | 30 | /** |
30 | | - * @param: one of always, never |
| 31 | + * @param opt one of always, never |
31 | 32 | */ |
32 | | -#define $inline(...) RSL_INLINE(__VA_ARGS__) |
| 33 | +#define $inline(opt) RSL_INLINE(opt) |
33 | 34 |
|
34 | | -/** Enable this overload if expr evaluates to true. Clang only. |
35 | | - * @param expr |
36 | | - */ |
| 35 | +/// Enable this overload if a given expression evaluates to true. Clang only. |
37 | 36 | #define $enable_if(...) RSL_ENABLE_IF(__VA_ARGS__) |
38 | 37 |
|
39 | 38 | //! Workaround for expansion statements in GCC |
40 | | -#if $compiler_is(GCC) |
41 | | -# define $define_static_array(...) [:std::meta::reflect_constant_array(__VA_ARGS__):] |
42 | | -#else |
43 | | -# define $define_static_array(...) std::define_static_array(__VA_ARGS__) |
44 | | -#endif |
| 39 | +#define $define_static_array(...) RSL_DEFINE_STATIC_ARRAY(__VA_ARGS__) |
45 | 40 |
|
46 | 41 | /** Applies `macro` to every element and inserts delimiters produced by `delim` between elements |
47 | 42 | * @param macro function-like macro applied to every element |
|
62 | 57 | */ |
63 | 58 | #define $for_each(macro, ...) RSL_IMPL_FOR_EACH_DELIM(macro, RSL_IMPL_DELIM_NONE, __VA_ARGS__) |
64 | 59 |
|
| 60 | +/** |
| 61 | + * @param op one of push, pop, disable, error |
| 62 | + * @param ... optional arguments |
| 63 | +*/ |
65 | 64 | #define $diagnostics(op, ...) RSL_DIAG_##op (__VA_ARGS__) |
66 | 65 |
|
67 | 66 | /// Introduces an explicit template region |
|
0 commit comments