|
|
|
|
|
by William_BB
3 days ago
|
|
I'm not sure what's so "spooky" about this example. It's really obvious if you know what `std::string_view` is. `Sanitize()` signature is fishy to begin with -- it takes a single string by const ref, but returns a string view. And I don't even consider myself very experienced in C++. Sure, it'd be nice if the compiler didn't allow you to write this code. But there are worse examples than this out there. |
|
To reply to GP: many projects specifically avoid the STL.