isocpp / isocpp/CppCoreGuidelines
Mention and enforce const unique_ptr pattern
Open
@NN--- is already working on this.
Since Feb 12, 2018.
- Dominant language
- CSS
- Stars
- 45.3k
- Forks
- 5.6k
- PR merge metrics
- No merged PRs in 30d
Description
C++ Core Guidelines suggest to use either unique_ptr or shared_ptr for better code.
It should also mention const unique_ptr pattern for scoped based pointers
void f()
{
// non-copyable, non-movable and non-resettable object
auto const o = make_unique<Object>();
}
EDITED: Use make_unique
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.