aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRobin Voetter <robin@voetter.nl>2022-09-17 00:24:51 +0200
committerRobin Voetter <robin@voetter.nl>2022-10-12 20:36:14 +0200
commitfb9a7dad178398326033dfcddedf41b59227bc70 (patch)
treef60e021602f289afc0e3db6a5a78e30810d572de /doc
parent9f14681473140cd79e6d38cb2bb46a90c1be1259 (diff)
downloadzig-fb9a7dad178398326033dfcddedf41b59227bc70.tar.gz
zig-fb9a7dad178398326033dfcddedf41b59227bc70.zip
add @addrSpaceCast to langref
Diffstat (limited to 'doc')
-rw-r--r--doc/langref.html.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in
index effa974f22..872c305252 100644
--- a/doc/langref.html.in
+++ b/doc/langref.html.in
@@ -7956,6 +7956,15 @@ fn readFile(allocator: Allocator, filename: []const u8) ![]u8 {
The {#syntax#}comptime{#endsyntax#} keyword on a parameter means that the parameter must be known
at compile time.
</p>
+ {#header_open|@addrSpaceCast#}
+ <pre>{#syntax#}@addrSpaceCast(comptime addrspace: std.builtin.AddressSpace, ptr: anytype) anytype{#endsyntax#}</pre>
+ <p>
+ Converts a pointer from one address space to another. Depending on the current target and
+ address spaces, this cast may be a no-op, a complex operation, or illegal. If the cast is
+ legal, then the resulting pointer points to the same memory location as the pointer operand.
+ It is always valid to cast a pointer between the same address spaces.
+ </p>
+ {#header_close#}
{#header_open|@addWithOverflow#}
<pre>{#syntax#}@addWithOverflow(comptime T: type, a: T, b: T, result: *T) bool{#endsyntax#}</pre>
<p>