| ... | ... | @@ -4907,7 +4907,12 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val |
| 4907 | 4907 | {#header_open|@fieldParentPtr#} |
| 4908 | 4908 | <pre>{#syntax#}@fieldParentPtr(comptime field_name: []const u8, field_ptr: *T) anytype{#endsyntax#}</pre> |
| 4909 | 4909 | <p> |
| 4910 | | Given a pointer to a field, returns the base pointer of a struct. |
| 4910 | Given a pointer to a struct field, returns a pointer to the struct containing that field. |
| 4911 | The return type (and struct in question) is the inferred result type. |
| 4912 | </p> |
| 4913 | <p> |
| 4914 | If {#syntax#}field_ptr{#endsyntax#} does not point to the {#syntax#}field_name{#endsyntax#} field of an instance of |
| 4915 | the result type, and the result type has ill-defined layout, invokes unchecked {#link|Undefined Behavior#}. |
| 4911 | 4916 | </p> |
| 4912 | 4917 | {#header_close#} |
| 4913 | 4918 | |