BaseFormatter<Derived, containerMode, Args...>::BaseFormatter(
StringPiece str,
Args&&... args)
- : str_(str),
- values_(FormatValue<typename std::decay<Args>::type>(
- std::forward<Args>(args))...) {}
+ : str_(str), values_(std::forward<Args>(args)...) {}
template <class Derived, bool containerMode, class... Args>
template <class Output>
throw BadFormatArg("folly::format: invalid precision");
}
- // XXX: clang should be smart enough to not need the two static_cast<size_t>
- // uses below given the above checks. If clang ever becomes that smart, we
- // should remove the otherwise unnecessary warts.
-
if (arg.precision != FormatArg::kDefaultPrecision &&
val.size() > static_cast<size_t>(arg.precision)) {
- val.reset(val.data(), size_t(arg.precision));
+ val.reset(val.data(), static_cast<size_t>(arg.precision));
}
constexpr int padBufSize = 128;
float val_;
};
-// Sring-y types (implicitly convertible to StringPiece, except char*)
+// String-y types (implicitly convertible to StringPiece, except char*)
template <class T>
class FormatValue<
T,