styleguide icon indicating copy to clipboard operation
styleguide copied to clipboard

Reconsider information for the application of smart pointers

Open elfring opened this issue 5 years ago • 0 comments

I would appreciate further clarification around information like the following.

  • https://github.com/google/styleguide/blob/5651966e0275572a9956199418d89c9ccc7b2b1a/cppguide.html#L969 … Smart pointers (unique_ptr, shared_ptr): smart pointers execute cleanup during destruction and are therefore forbidden. …
  • https://github.com/google/styleguide/blob/5651966e0275572a9956199418d89c9ccc7b2b1a/cppguide.html#L2102 … Never use std::auto_ptr. Instead, use std::unique_ptr. …

:crystal_ball: Should a conflict be resolved for such an advice?

elfring avatar Mar 18 '20 10:03 elfring