| 159 | |
| 160 | template<typename... Args> |
| 161 | inline bool parseComplex(std::string_view _value, Args&... args) |
| 162 | { |
| 163 | std::stringstream stream; |
| 164 | stream << _value; |
| 165 | |
| 166 | ((stream >> args), ...); |
| 167 | |
| 168 | if (stream.fail()) |
| 169 | return false; |
| 170 | |
| 171 | // check if there is more data, return false in this case |
| 172 | int item = stream.get(); |
| 173 | while (item != -1) |
| 174 | { |
| 175 | if (item != ' ' && item != '\t') |
| 176 | return false; |
| 177 | item = stream.get(); |
| 178 | } |
| 179 | |
| 180 | return true; |
| 181 | } |
| 182 | |
| 183 | template<> |
| 184 | inline bool parseComplex<bool>(std::string_view _value, bool& arg) |
no test coverage detected