File tree 2 files changed +4
-8
lines changed
2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -36,12 +36,10 @@ And return the `std::shared_ptr` pointer of this object type. For example:
36
36
``` cpp
37
37
#include < iostream>
38
38
#include < memory>
39
- void foo (std::shared_ptr<int > i)
40
- {
39
+ void foo (std::shared_ptr<int > i) {
41
40
(* i)++;
42
41
}
43
- int main()
44
- {
42
+ int main() {
45
43
// auto pointer = new int(10); // illegal, no direct assignment
46
44
// Constructed a std::shared_ptr
47
45
auto pointer = std::make_shared<int >(10);
Original file line number Diff line number Diff line change @@ -38,12 +38,10 @@ order: 5
38
38
``` cpp
39
39
#include < iostream>
40
40
#include < memory>
41
- void foo (std::shared_ptr<int > i)
42
- {
41
+ void foo (std::shared_ptr<int > i) {
43
42
(* i)++;
44
43
}
45
- int main()
46
- {
44
+ int main() {
47
45
// auto pointer = new int(10); // illegal, no direct assignment
48
46
// Constructed a std::shared_ptr
49
47
auto pointer = std::make_shared<int >(10);
You can’t perform that action at this time.
0 commit comments