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

Class test_visitor_one

test_visit_struct.cpp:51–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49using spair = std::pair<std::string, std::string>;
50
51struct test_visitor_one {
52 std::vector<spair> result;
53
54 void operator()(const char * name, const std::string & s) {
55 result.emplace_back(spair{std::string{name}, s});
56 }
57
58 template <typename T>
59 void operator()(const char * name, const T & t) {
60 result.emplace_back(spair{std::string{name}, std::to_string(t)});
61 }
62};
63
64struct test_visitor_ptr {
65 std::vector<spair> result;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected