4 ms·
I like maybe_value dereferences NULL with SIGILL and you have at least a backtrace with exact invalid access position.
by bvrmn 4mo ago
I like maybe_value dereferences NULL with SIGILL and you have at least a backtrace with exact invalid access position.
- uecker 4mo agoOh, you can get the information at compile time as well. https://godbolt.org/z/hTYbTE8j8 https://godbolt.org/z/hTYbTE8j8 (or https://godbolt.org/z/K1M68sY3Y https://godbolt.org/z/K1M68sY3Y but this will be tricky in a larger code base)
- bvrmn 4mo agoThat's the reason language/compiler should directly support optionality. You can't fool yourself and have to handle all cases: https://godbolt.org/z/4GqMdPej3 https://godbolt.org/z/4GqMdPej3