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
Here is pseudocode taking in account templates #135, inlining #88, default values #271 and sizeof #84 proposals
type:
optional:
templates:
- type # the type to be wrappedparams:
- id: default_valuetype: typeseq:
- id: valuetype: typeif: should_parseinline: truedefault: default_valueinstances:
should_parse:
value: lea() + sizeof() <= sizeof(_parent)
This code should parse a field if there is enough space for them in a stream. This kind fields must be in the end of structs. Putting them in the middle is UB.
Usage:
seq:
- id: atype: b
- id: ctype: optional<u8>(0)
The text was updated successfully, but these errors were encountered:
Here is pseudocode taking in account templates #135, inlining #88, default values #271 and sizeof #84 proposals
This code should parse a field if there is enough space for them in a stream. This kind fields must be in the end of structs. Putting them in the middle is UB.
Usage:
The text was updated successfully, but these errors were encountered: