A20-8-5
-A20-8-6
: Cannot create a smart pointer with nullptr
value
#721
Labels
false positive/false negative
An issue related to observed false positives or false negatives.
Affected rules
A20-8-5
:cpp/autosar/make-unique-not-used-to-construct-object-owned-by-unique-ptr
A20-8-6
:cpp/autosar/make-shared-not-used-to-construct-object-owned-by-shared-ptr
Description
A20-8-5
triggers when initializing anunique_ptr
tonullptr
.A20-8-6
triggers when initializing anshared_ptr
tonullptr
.Initializing a smart pointer with a
nullptr
value can be however necessary in some specific cases.Example
The text was updated successfully, but these errors were encountered: