|
58 | 58 | */
|
59 | 59 | #define DEFINE_FSTR_MAP_LOCAL(name, KeyType, ContentType, ...) \
|
60 | 60 | static DEFINE_FSTR_MAP_DATA(FSTR_DATA_NAME(name), KeyType, ContentType, __VA_ARGS__); \
|
61 |
| - static constexpr DEFINE_FSTR_REF_NAMED(name, DECL((FSTR::Map<KeyType, ContentType>))); |
| 61 | + static FSTR_CONSTEXPR DEFINE_FSTR_REF_NAMED(name, DECL((FSTR::Map<KeyType, ContentType>))); |
62 | 62 |
|
63 | 63 | /**
|
64 | 64 | * @brief Define a Map Object with global reference, specifying the number of elements
|
|
77 | 77 | */
|
78 | 78 | #define DEFINE_FSTR_MAP_SIZED_LOCAL(name, KeyType, ContentType, size, ...) \
|
79 | 79 | static DEFINE_FSTR_MAP_DATA_SIZED(FSTR_DATA_NAME(name), KeyType, ContentType, size, __VA_ARGS__); \
|
80 |
| - static constexpr DEFINE_FSTR_REF_NAMED(name, DECL((FSTR::Map<KeyType, ContentType>))); |
| 80 | + static FSTR_CONSTEXPR DEFINE_FSTR_REF_NAMED(name, DECL((FSTR::Map<KeyType, ContentType>))); |
81 | 81 |
|
82 | 82 | /**
|
83 | 83 | * @brief Define a Map data structure
|
|
89 | 89 | */
|
90 | 90 | #define DEFINE_FSTR_MAP_DATA(name, KeyType, ContentType, ...) \
|
91 | 91 | DEFINE_FSTR_MAP_DATA_SIZED(name, KeyType, ContentType, \
|
92 |
| - (sizeof((const FSTR::MapPair<KeyType, ContentType>[]){__VA_ARGS__}) / \ |
93 |
| - sizeof(FSTR::MapPair<KeyType, ContentType>)), \ |
94 |
| - __VA_ARGS__) |
| 92 | + FSTR_VA_NARGS(DECL((FSTR::MapPair<KeyType, ContentType>)), __VA_ARGS__), __VA_ARGS__) |
95 | 93 |
|
96 | 94 | /**
|
97 | 95 | * @brief Define a Map data structure, specifying the number of elements
|
|
102 | 100 | * @param ... List of MapPair definitions { key, &content }
|
103 | 101 | */
|
104 | 102 | #define DEFINE_FSTR_MAP_DATA_SIZED(name, KeyType, ContentType, size, ...) \
|
105 |
| - constexpr const struct { \ |
| 103 | + FSTR_CONSTEXPR const struct { \ |
106 | 104 | FSTR::ObjectBase object; \
|
107 | 105 | FSTR::MapPair<KeyType, ContentType> data[size]; \
|
108 | 106 | } FSTR_PACKED FSTR_ALIGNED name PROGMEM = {{sizeof(name.data)}, {__VA_ARGS__}}; \
|
|
0 commit comments