CppCoreGuidelines icon indicating copy to clipboard operation
CppCoreGuidelines copied to clipboard

R.13 is out of date with C++17

Open tclinken opened this issue 5 years ago • 1 comments

R.13 uses the example:

// BAD: potential leak
fun(shared_ptr<Widget>(new Widget(a, b)), shared_ptr<Widget>(new Widget(c, d)));

This could leak prior to C++17, but with the change from this accepted proposal, there is no potential leak in C++17. The explanation of this rule should be updated to reflect this.

tclinken avatar Oct 17 '20 17:10 tclinken

I think this was mentioned in and is addressed by #1610

shaneasd avatar Oct 17 '20 18:10 shaneasd