MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / main

Function main

tests/ClassOperatorHandler2Test.cpp:58–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56};
57
58int main()
59{
60 []() {
61 auto n = 10;
62 f(n); // identifier of a variable is almost always an lvalue
63 f(42); // 42 is a prvalue (like most literals)
64 f(int{}); // int{} is a prvalue
65
66 Foo f(1);
67
68 ++f;
69 f++;
70
71 --f;
72 f--;
73
74 printf("%d\n", f++);
75 printf("%d %d\n", f++, 1);
76
77 printf("%d\n", f--);
78 printf("%d %d\n", f--, 1);
79
80 Foo* ff = &f;
81
82 printf("%d\n", ff->Get());
83
84 ++ff;
85 ff++;
86 ++++ff;
87
88 --ff;
89 ff--;
90 ----ff;
91
92 printf("%d\n", f.Get());
93 }();
94
95
96 auto n = 10;
97 f(n); // identifier of a variable is almost always an lvalue
98 f(42); // 42 is a prvalue (like most literals)
99 f(int{}); // int{} is a prvalue
100
101 Foo f(1);
102
103 ++f;
104 f++;
105
106 --f;
107 f--;
108
109 printf("%d\n", f++);
110 printf("%d %d\n", f++, 1);
111
112 printf("%d\n", f--);
113 printf("%d %d\n", f--, 1);
114
115 Foo* ff = &f;

Callers

nothing calls this directly

Calls 2

fFunction · 0.70
GetMethod · 0.45

Tested by

no test coverage detected