authorgravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2022-09-17 00:24:51+02:00
committergravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2022-10-12 20:36:14+02:00
logfb9a7dad178398326033dfcddedf41b59227bc70
treef60e021602f289afc0e3db6a5a78e30810d572de
parent9f14681473140cd79e6d38cb2bb46a90c1be1259
signaturelock-open Commit is signed but in an unrecognized format.

add @addrSpaceCast to langref


1 files changed, 9 insertions(+), 0 deletions(-)

doc/langref.html.in+9
......@@ -7956,6 +7956,15 @@ fn readFile(allocator: Allocator, filename: []const u8) ![]u8 {
79567956 The {#syntax#}comptime{#endsyntax#} keyword on a parameter means that the parameter must be known
79577957 at compile time.
79587958 </p>
7959 {#header_open|@addrSpaceCast#}
7960 <pre>{#syntax#}@addrSpaceCast(comptime addrspace: std.builtin.AddressSpace, ptr: anytype) anytype{#endsyntax#}</pre>
7961 <p>
7962 Converts a pointer from one address space to another. Depending on the current target and
7963 address spaces, this cast may be a no-op, a complex operation, or illegal. If the cast is
7964 legal, then the resulting pointer points to the same memory location as the pointer operand.
7965 It is always valid to cast a pointer between the same address spaces.
7966 </p>
7967 {#header_close#}
79597968 {#header_open|@addWithOverflow#}
79607969 <pre>{#syntax#}@addWithOverflow(comptime T: type, a: T, b: T, result: *T) bool{#endsyntax#}</pre>
79617970 <p>