Adapted the documentation to the possibility of leaving out rfl::Field

This commit is contained in:
Patrick Urbanke
2023-11-28 19:09:41 +01:00
parent 456fc33613
commit 8ff4d105c6
15 changed files with 277 additions and 212 deletions
+3 -3
View File
@@ -19,11 +19,11 @@ So this is how we could rewrite the previous example:
```cpp
struct Person {
rfl::Field<"firstName", std::string> first_name;
rfl::Field<"lastName", std::string> last_name = "Simpson";
rfl::Rename<"firstName", std::string> first_name;
rfl::Rename<"lastName", std::string> last_name = "Simpson";
// Indicates to the library that the field is optional.
rfl::Field<"children", std::optional<std::vector<Person>>> children = rfl::default_value;
std::optional<std::vector<Person>> children;
};
const auto bart = Person{.first_name = "Bart"};