4 ms·
There's a few where C++11 has rendered the situation far less common, or the advice not-so-good. For example, the auto_ptr one (advice should be: don't use it)
by lbrandy 14y ago
There's a few where C++11 has rendered the situation far less common, or the advice not-so-good.
For example, the auto_ptr one (advice should be: don't use it).
Or the ones that use raw pointer data members and 'delete' in the destructor (for example, the one about the rule of three). This is still good advice, but needed far, far, far more rarely since we can use shared_ptr and unique_ptr to give proper copy/assignment to internal pointers. C++11 has gotten us to a point where using 'new' or 'delete' keywords, even in constructor/destructors are possible code smells.