With GCC and `-fsanitize=address,undefined` flag(s) I have catched it during runtime.
I've got a nice `==31604==ERROR: AddressSanitizer: stack-use-after-scope on address`
quuxplusone•7m ago
This is why I call string_view a "parameter-only type": it's fine to take as a parameter, but not fine to return or to store as a variable. (For sane definitions of "fine" and "not fine," of course. The blog post demonstrates one way it can go "not fine.")
stefanos82•2h ago
I've got a nice `==31604==ERROR: AddressSanitizer: stack-use-after-scope on address`