You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem here is that `button_pressed_t` and `butten_released_t` virtually look
83
-
indistinguishable. The will both be serialized to `{}`.
82
+
The problem here is that `button_pressed_t` and `button_released_t` virtually look
83
+
indistinguishable when they are serialized. The will both be serialized to `{}`.
84
84
85
85
But you can add this processor to automatically add tags and avoid the problem:
86
86
@@ -114,6 +114,9 @@ struct key_pressed_t {
114
114
{"your_custom_tag":{"key":99}}
115
115
```
116
116
117
+
Note that there are other ways to address problems like this, for instance `rfl::TaggedUnion`.
118
+
Please refer to the relevant sections of the documentation.
119
+
117
120
### `rfl::AllowRawPtrs`
118
121
119
122
By default, reflect-cpp does not allow *reading into* raw pointers. (*Writing from* raw pointers is never a problem.) This is because reading into raw pointers means that the library will allocate memory that the user then has to manually delete. This can lead to misunderstandings and memory leaks.
0 commit comments