| 171 | # define XMLDATETIME_HAS_GETEPOCH 0 |
| 172 | namespace { |
| 173 | bool parse_time_string( |
| 174 | const std::string& whole, size_t& pos, std::string& value, size_t width = std::string::npos) |
| 175 | { |
| 176 | const bool to_end = width == std::string::npos; |
| 177 | const size_t size = whole.size(); |
| 178 | if (pos >= size || (!to_end && pos + width > size)) { |
| 179 | return false; |
| 180 | } |
| 181 | value = whole.substr(pos, width); |
| 182 | pos = to_end ? size : pos + width; |
| 183 | return true; |
| 184 | } |
| 185 | |
| 186 | bool parse_time_field( |
| 187 | const std::string& whole, size_t& pos, int& value, size_t width = 2) |
no test coverage detected