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
Who stumbled with reinterpreting comptime_int to a slice [32]u8, you need first to define comptime_int as integer u256 then convert it into a slice using @bitCast.
website/versioned_docs/version-0.12/01-language-basics/14-slices.mdx
Who stumbled with reinterpreting
comptime_int
to a slice[32]u8
, you need first to definecomptime_int
as integeru256
then convert it into a slice using@bitCast
.I think this example would teach why
comptime_int
should be defined as sized integer, and how to do something like C++ have -reinterpret_cast
.The text was updated successfully, but these errors were encountered: