Skip to content

Commit 9ea1321

Browse files
neokeldlerno
andauthored
@compact deprecated use for comparison. #190 (#191)
* Deprecate @compact use for comparison. Old behaviour is enabled using --use-old-compact-eq. * Update documentation for @compact attribute Clarified the behavior of the @compact attribute regarding padding and its deprecation. --------- Co-authored-by: Christoffer Lerno <[email protected]>
1 parent 68d5ce1 commit 9ea1321

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/content/docs/Language Common/attributes.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ and is a no-op on 64-bit Windows.
6565

6666
*Used for: struct, union*
6767

68-
When placed on a struct or union, it allows the value to be compared
69-
using `==` and `!=`. The restriction is that it may not have any
70-
padding, as if it had the `@nopadding` attribute.
68+
This attribute works like @nopadding, but is applied recursively for any sub-elements, ensuring that there is no padding anywhere in the struct.
7169

7270
### `@const`
7371

0 commit comments

Comments
 (0)