commit 9086452ff98cf0ec271f449d0824d5b070b26f45 (tree) parent 74972531b5a3ea923dee04abdd1cfcf19f99d69d Author: Jonathan Marler <johnnymarler@gmail.com> Date: Wed, 7 Jul 2021 12:39:44 -0600 clarify @bitSizeOf behavior Diffstat:
| M | doc/langref.html.in | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/langref.html.in b/doc/langref.html.in @@ -7178,7 +7178,8 @@ fn func(y: *i32) void { {#header_open|@bitSizeOf#} <pre>{#syntax#}@bitSizeOf(comptime T: type) comptime_int{#endsyntax#}</pre> <p> - This function returns the number of bits it takes to store {#syntax#}T{#endsyntax#} in memory. + This function returns the number of bits it takes to store {#syntax#}T{#endsyntax#} in memory if the type + were a field in a packed struct/union. The result is a target-specific compile time constant. </p> <p>