add small section to README

This commit is contained in:
stu
2024-03-01 19:23:32 +00:00
parent ec437c51f2
commit 1358223955
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -228,6 +228,9 @@ This results in the following JSON string:
{"pos_x":2.0,"pos_y":3.0,"shape":"square","color":"red|blue"}
```
You can also directly convert between enumerator values and strings with `rfl::enum_to_string()` and `rfl::string_to_enum()`, or
obtain list of enumerator name and value pairs with `rfl::get_enumerators<EnumType>()` or `rfl::get_enumerator_array<EnumType>()`.
## Algebraic data types
reflect-cpp supports Pydantic-style tagged unions, which allow you to form algebraic data types:
+1 -1
View File
@@ -148,7 +148,7 @@ This works, because 16 + 256 + 512 + 1024 + 8192 = 10000. Flag enums are *always
## General-purpose enumeration utilities
reflect-cpp also allows you to directly convert between enumeration values and strings:
reflect-cpp also allows you to directly convert between enumerator values and strings:
```cpp
enum class Color { red, green, blue };