| ... | @@ -7956,6 +7956,15 @@ fn readFile(allocator: Allocator, filename: []const u8) ![]u8 { | ... | @@ -7956,6 +7956,15 @@ fn readFile(allocator: Allocator, filename: []const u8) ![]u8 { |
| 7956 | The {#syntax#}comptime{#endsyntax#} keyword on a parameter means that the parameter must be known | 7956 | The {#syntax#}comptime{#endsyntax#} keyword on a parameter means that the parameter must be known |
| 7957 | at compile time. | 7957 | at compile time. |
| 7958 | </p> | 7958 | </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#} |
| 7959 | {#header_open|@addWithOverflow#} | 7968 | {#header_open|@addWithOverflow#} |
| 7960 | <pre>{#syntax#}@addWithOverflow(comptime T: type, a: T, b: T, result: *T) bool{#endsyntax#}</pre> | 7969 | <pre>{#syntax#}@addWithOverflow(comptime T: type, a: T, b: T, result: *T) bool{#endsyntax#}</pre> |
| 7961 | <p> | 7970 | <p> |