| 40 | namespace common { |
| 41 | namespace { |
| 42 | struct GetStringVisitor : boost::static_visitor<std::string> { |
| 43 | std::string operator()(elements::StringElement const &elt) const { |
| 44 | return elt.getString(); |
| 45 | } |
| 46 | template <typename T> std::string operator()(T const &) const { |
| 47 | return std::string{}; |
| 48 | } |
| 49 | }; |
| 50 | } |
| 51 | inline std::string getJSONStringAtNode(PathNode const &node) { |
| 52 | return boost::apply_visitor(GetStringVisitor(), node.value()); |
no outgoing calls
no test coverage detected