MCPcopy Create free account
hub / github.com/cbeck88/visit_struct / test_visitor_three

Class test_visitor_three

test_visit_struct.cpp:114–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112
113
114struct test_visitor_three {
115 int result = 0;
116
117 template <typename T>
118 void operator()(const char *, T &&) {}
119
120 void operator()(const char *, int &) {
121 result = 1;
122 }
123
124 void operator()(const char *, const int &) {
125 result = 2;
126 }
127
128 void operator()(const char *, int &&) {
129 result = 3;
130 }
131
132 // Make it non-copyable and non-moveable, apply visitor should still work.
133 test_visitor_three() = default;
134 test_visitor_three(const test_visitor_three &) = delete;
135 test_visitor_three(test_visitor_three &&) = delete;
136};
137
138
139// Some binary visitors for test

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected