Removed any references to anonymous fields

This commit is contained in:
Patrick Urbanke
2023-11-28 20:20:51 +01:00
parent fa32896387
commit f51053d26f
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
1.3) [Struct flattening](https://github.com/getml/reflect-cpp/blob/main/docs/flatten_structs.md) - For making struct A "inherit" the fields of struct B.
1.4) [Anonymous fields](https://github.com/getml/reflect-cpp/blob/main/docs/anonymous_fields.md) - For structs without field names or `rfl::Field`.
1.4) [The rfl::Field-syntax](https://github.com/getml/reflect-cpp/blob/main/docs/field_syntax.md) - Describes an alternative syntax which requires slightly more effort, but allows for some powerful functionalities.
1.5) [String literals](https://github.com/getml/reflect-cpp/blob/main/docs/literals.md) - For representing strings that can only assume a limited number of enumerated values.
+5
View File
@@ -19,6 +19,11 @@ should be negligible in most cases, this allows for compile-time checks
which are otherwise impossible. It also allows for functionalities like `rfl::replace`,
`rfl::as` or interactions with `rfl::NamedTuple` which we will see later in the documentation.
There are a two things you have to keep in mind:
1) If you annotate *some* of the fields using either `rfl::Field`, then you must annotate *all* of them using one of these two.
2) If you are combining structs using `rfl::Flatten`, then they structs combined like this must either be annotated or not.
You can initilize your struct like this:
```cpp