diff --git a/format.h b/format.h index ab9a4acb..453cf054 100644 --- a/format.h +++ b/format.h @@ -1305,16 +1305,19 @@ class IntFormatSpec : public SpecT { }; // A string format specifier. -template +template class StrFormatSpec : public AlignSpec { private: - const T *str_; + const Char *str_; public: - StrFormatSpec(const T *str, unsigned width, wchar_t fill) - : AlignSpec(width, fill), str_(str) {} + template + StrFormatSpec(const Char *str, unsigned width, FillChar fill) + : AlignSpec(width, fill), str_(str) { + internal::CharTraits::convert(FillChar()); + } - const T *str() const { return str_; } + const Char *str() const { return str_; } }; /** @@ -1930,7 +1933,6 @@ class BasicWriter { template BasicWriter &operator<<(const StrFormatSpec &spec) { const StrChar *s = spec.str(); - // TODO: error if fill is not convertible to Char write_str(s, std::char_traits::length(s), spec); return *this; }