Created
September 9, 2020 14:48
-
-
Save jorangreef/77e7c609a15c6bea2ed749340c6ae9b3 to your computer and use it in GitHub Desktop.
stack or result location semantics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn stack_or_result_location_semantics() custom_struct { | |
var custom_structs: [1]custom_struct = undefined; | |
fill_in_custom_struct(&custom_structs, 1); | |
return custom_structs[0]; | |
} | |
fn boom_or_safe() void { | |
var custom_struct = stack_or_result_location_semantics(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment