MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / Foo

Class Foo

tests/relacy/integrated.cpp:33–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31};
32
33struct Foo {
34 static int& ctorCount() { static int c; return c; }
35 static int& dtorCount() { static int c; return c; }
36 static void reset() { ctorCount() = 0; dtorCount() = 0; }
37
38 Foo()
39 : id(-2)
40 {
41 ++ctorCount();
42 }
43
44 Foo(int id)
45 : id(id)
46 {
47 ++ctorCount();
48 }
49
50 Foo(Foo const& o)
51 : id(o.id)
52 {
53 ++ctorCount();
54 }
55
56 ~Foo()
57 {
58 RL_ASSERT(id != -1);
59 ++dtorCount();
60 id = -1;
61 }
62
63public:
64 int id;
65};
66
67
68

Callers 2

threadMethod · 0.70
threadMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected