-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMove.cpp
68 lines (50 loc) · 1.25 KB
/
Move.cpp
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/**
* \file Move.cpp
* \brief
*
* [review]
*/
#include <StdStream/StdStream.h>
#include <StdTest/StdTest.h>
#include <Stl.h>
#define RULE_5_OPTION_LOG 1
#include <Idioms/RuleOf/Rule3Move.h>
//-------------------------------------------------------------------------------------------------
int main(int, char **)
{
{
std::vector<Rule3Move> files;
{
std::cout << "::::: files.push_back('data1.txt') :::::" << std::endl;
files.push_back( Rule3Move("data1.txt") );
std::cout << "::::: files.push_back('data2.txt') :::::" << std::endl;
files.push_back( Rule3Move("data2.txt") );
}
{
std::cout << "::::: files.erase() :::::" << std::endl;
files.erase( files.cbegin() );
}
{
std::cout << "::::: files - dtor :::::" << std::endl;
}
}
std::cout << std::endl;
return EXIT_SUCCESS;
}
//-------------------------------------------------------------------------------------------------
#if OUTPUT
[Ctor] const char *
[Ctor] Move
[Dtor]
::::: files.push_back('data2.txt') :::::
[Ctor] const char *
[Ctor] Move
[Ctor] Move
[Dtor]
[Dtor]
::::: files.erase() :::::
[Op] Move
[Dtor]
::::: files - dtor :::::
[Dtor]
#endif