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
Copy file name to clipboardExpand all lines: docs/syntax_and_semantics/alignof.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -38,3 +38,5 @@ The argument to alignof is a [type](type_grammar.md) and is often combined with
38
38
a = 1
39
39
alignof(typeof(a)) # => 4
40
40
```
41
+
42
+
`alignof` can be used in the macro language, but only on types with stable size and alignment. See the API docs of [`alignof`](https://crystal-lang.org/api/Crystal/Macros.html#alignof(type):NumberLiteral-instance-method) for details.
Copy file name to clipboardExpand all lines: docs/syntax_and_semantics/sizeof.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -23,3 +23,5 @@ The argument to sizeof is a [type](type_grammar.md) and is often combined with [
23
23
a = 1
24
24
sizeof(typeof(a)) # => 4
25
25
```
26
+
27
+
`sizeof` can be used in the macro language, but only on types with stable size and alignment. See the API docs of [`sizeof`](https://crystal-lang.org/api/Crystal/Macros.html#sizeof(type):NumberLiteral-instance-method) for details.
0 commit comments