-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInsert.cpp
More file actions
42 lines (30 loc) · 789 Bytes
/
Insert.cpp
File metadata and controls
42 lines (30 loc) · 789 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
31
32
33
34
35
36
37
38
39
40
41
42
/**
* \file Insert.cpp
* \brief
*
* \todo
*/
#include <StdStream/StdStream.h>
#include <StdTest/StdTest.h>
#include <set>
//-------------------------------------------------------------------------------------------------
int main(int, char **)
{
std::set<int> s;
auto it1 = s.insert(1);
std::cout << STD_TRACE_VAR(it1.second) << std::endl;
auto it2 = s.insert(2);
std::cout << STD_TRACE_VAR(it2.second) << std::endl;
auto it3 = s.insert(2);
std::cout << STD_TRACE_VAR(it3.second) << std::endl;
auto it4 = s.insert(3);
std::cout << STD_TRACE_VAR(it4.second) << std::endl;
return 0;
}
//-------------------------------------------------------------------------------------------------
#if OUTPUT
it1.second: 1
it2.second: 1
it3.second: 0
it4.second: 1
#endif