mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-04 01:06:19 +08:00
Literals
This commit is contained in:
+2
-2
@@ -32,8 +32,8 @@ switch(my_literal.value()) {
|
||||
}
|
||||
```
|
||||
|
||||
Literals are stored as `uint8_t` or `uint16_t` under-the-hood. But you can extract their name using `.name()` as a string
|
||||
or the underlying value using `.value`.
|
||||
Literals are stored as `uint8_t` or `uint16_t` under-the-hood. But you can extract their name as a string using `.name()`
|
||||
or the underlying value using `.value()`.
|
||||
|
||||
```cpp
|
||||
using MyLiteral = rfl::Literal<"option1", "option2", ...>;
|
||||
|
||||
Reference in New Issue
Block a user