| 254 | |
| 255 | template <typename T> |
| 256 | void parsePair(std::istringstream& ss, double& low, double& high) |
| 257 | { |
| 258 | low = high = 0; |
| 259 | |
| 260 | if (!discardSpacesBefore(ss, '[')) |
| 261 | throw typename T::error("No opening '[' in range."); |
| 262 | |
| 263 | ss >> low; |
| 264 | if (!ss.good()) |
| 265 | throw typename T::error("No valid minimum value for range."); |
| 266 | |
| 267 | if (!discardSpacesBefore(ss, ',')) |
| 268 | throw typename T::error("No ',' separating minimum/maximum values."); |
| 269 | |
| 270 | ss >> high; |
| 271 | if (!ss.good()) |
| 272 | throw typename T::error("No valid maximum value for range."); |
| 273 | |
| 274 | if (!discardSpacesBefore(ss, ']')) |
| 275 | throw typename T::error("No closing ']' in range."); |
| 276 | } |
| 277 | |
| 278 | } // unnamed namespace |
| 279 |
no test coverage detected