-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestItemMain.cpp
More file actions
30 lines (30 loc) · 942 Bytes
/
TestItemMain.cpp
File metadata and controls
30 lines (30 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//#include "TestItem.h"
//#include "TestItem2.h"
//int main()
//{
// unique_ptr<TestItem>ptr_uniq(new TestItem(25));
// ptr_uniq->Print();
// //ďîěčëęŕ, ˙ęůî ńďđîáóşěî ďđčçíŕ÷čňč äâŕ îäíî÷ŕńíî łńíóţ÷ł ďîęŕć÷čęč íŕ ňó ńŕěó ŕäđĺńó:
// //unique_ptr<TestItem>ptr_uniq2 = ptr_uniq;
// //unique_ptr<TestItem>ptr_uniq3;
// //ptr_uniq3 = ptr_uniq;
// unique_ptr<TestItem>ptr_uniq4 = move(ptr_uniq);
// ptr_uniq4->Print();
//
// cout << "\n";
// shared_ptr<TestItem2> ptr_shared(new TestItem2(15));
// shared_ptr<TestItem2> ptr_shared2 = ptr_shared;
// shared_ptr<TestItem2> ptr_shared3;
// ptr_shared3 = ptr_shared;
// cout << "ptr_shared3:\t";
// ptr_shared3->Print();
// cout << ptr_shared.use_count() << "\n";
// shared_ptr<TestItem2> ptr_shared4(new TestItem2(5));
// ptr_shared3 = ptr_shared4;
// cout << ptr_shared.use_count() << "\n";
// cout << ptr_shared3.use_count() << "\n";
// cout << "ptr_shared3:\t";
// ptr_shared3->Print();
//
//
//}