mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-06 02:36:18 +08:00
Removed any references to anonymous fields
This commit is contained in:
+1
-1
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user