google / google/styleguide

Reconsider information for the application of smart pointers

Open
#539 0 comments 1 reaction 0 assignees View on GitHub
lang:cpp
Dominant language
HTML
Stars
39.6k
Forks
12.9k
Avg merge
42m
Merged PRs (30d)
15

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.