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
+2 -11
View File
@@ -6,9 +6,9 @@ For the purpose of this section, any field of type `std::optional`, `std::shared
Please refer to the section on optional fields for details.
## Structs with `rfl::Field` and `rfl::NamedTuple`
## Rules
For structs with `rfl::Field` and `rfl::NamedTuple`, the following rules apply:
The following rules apply:
- You *can* add optional fields.
- You *can* remove any optional or required fields, if they are no longer needed.
@@ -17,15 +17,6 @@ For structs with `rfl::Field` and `rfl::NamedTuple`, the following rules apply:
- You *can not* add any required fields.
- You *can not* change the field names of any required fields.
## Structs without `rfl::Field` (anonymous fields) and `std::tuple`
For structs without `rfl::Field` and `std::tuple`, the following rules apply:
- You *can* add optional fields at the end of your struct or tuple.
- You *can not* remove any optional or required fields, even if they are no longer needed.
- You *can not* change the order of any existing fields.
- You *can not* add any required fields.
## API versioning
If you find it difficult to follow the rules as stated above or you cannot guarantee that you