mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-06 10:46:18 +08:00
Adapted the documentation to the possibility of leaving out rfl::Field
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user