mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
code typo in R.20 (#1619)
This commit is contained in:
parent
986402298a
commit
97797870ad
|
@ -9494,8 +9494,8 @@ Consider:
|
|||
{
|
||||
X x;
|
||||
X* p1 { new X }; // see also ???
|
||||
unique_ptr<T> p2 { new X }; // unique ownership; see also ???
|
||||
shared_ptr<T> p3 { new X }; // shared ownership; see also ???
|
||||
unique_ptr<X> p2 { new X }; // unique ownership; see also ???
|
||||
shared_ptr<X> p3 { new X }; // shared ownership; see also ???
|
||||
auto p4 = make_unique<X>(); // unique_ownership, preferable to the explicit use "new"
|
||||
auto p5 = make_shared<X>(); // shared ownership, preferable to the explicit use "new"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user