3 ms·
Even when you use RAII, const-by-default, shared pointers, type-rich APIs, and the like, you're still using C++. That means you're still tied to C's legacy defa
by Jeaye 9y ago
Even when you use RAII, const-by-default, shared pointers, type-rich APIs, and the like, you're still using C++. That means you're still tied to C's legacy defaults (of UB) and that also means you're still using C++ value categories. If your "safe" C++ subset uses references, it can't be guaranteed to be safe (since plenty of valid code will lead to UB).
More info in the value category cheat sheet: https://github.com/jeaye/value-category-cheatsheet/blob/master/value-category-cheatsheet.pdf https://github.com/jeaye/value-category-cheatsheet/blob/mast...