mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
langref: clarify restricted @memcpy semantics
This commit is contained in:
parent
107b65ec5d
commit
249a20d972
1 changed files with 2 additions and 3 deletions
|
|
@ -5120,9 +5120,8 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
|
|||
<p>{#syntax#}source{#endsyntax#} must be a slice, a pointer to
|
||||
an array, or a many-item {#link|pointer|Pointers#}. It may
|
||||
have any alignment, and it may have any element type.</p>
|
||||
<p>The {#syntax#}source{#endsyntax#} element type must support {#link|Type Coercion#}
|
||||
into the {#syntax#}dest{#endsyntax#} element type. The element types may have
|
||||
different ABI size, however, that may incur a performance penalty.</p>
|
||||
<p>The {#syntax#}source{#endsyntax#} element type must have the same in-memory
|
||||
representation as the {#syntax#}dest{#endsyntax#} element type.</p>
|
||||
<p>Similar to {#link|for#} loops, at least one of {#syntax#}source{#endsyntax#} and
|
||||
{#syntax#}dest{#endsyntax#} must provide a length, and if two lengths are provided,
|
||||
they must be equal.</p>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue