MCPcopy Create free account
hub / github.com/ablab/spades / PrecisionHandler

Class PrecisionHandler

ext/src/cppformat/format.cc:266–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264};
265
266class PrecisionHandler :
267 public fmt::internal::ArgVisitor<PrecisionHandler, int> {
268 public:
269 unsigned visit_unhandled_arg() {
270 FMT_THROW(fmt::FormatError("precision is not integer"));
271 return 0;
272 }
273
274 template <typename T>
275 int visit_any_int(T value) {
276 if (!IntChecker<std::numeric_limits<T>::is_signed>::fits_in_int(value))
277 FMT_THROW(fmt::FormatError("number is too big"));
278 return static_cast<int>(value);
279 }
280};
281
282// Converts an integer argument to an integral type T for printf.
283template <typename T>

Callers 1

formatMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected