mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-28 13:19:48 +01:00
Workaround an issue with mixing std versions in gcc (#2017)
This commit is contained in:
@@ -1174,8 +1174,8 @@ template <typename T = void> struct null {};
|
||||
template <typename Char> struct fill_t {
|
||||
private:
|
||||
enum { max_size = 4 };
|
||||
Char data_[max_size];
|
||||
unsigned char size_;
|
||||
Char data_[max_size] = {Char(' '), Char(0), Char(0), Char(0)};
|
||||
unsigned char size_ = 1;
|
||||
|
||||
public:
|
||||
FMT_CONSTEXPR void operator=(basic_string_view<Char> s) {
|
||||
@@ -1195,13 +1195,6 @@ template <typename Char> struct fill_t {
|
||||
FMT_CONSTEXPR const Char& operator[](size_t index) const {
|
||||
return data_[index];
|
||||
}
|
||||
|
||||
static FMT_CONSTEXPR fill_t<Char> make() {
|
||||
auto fill = fill_t<Char>();
|
||||
fill[0] = Char(' ');
|
||||
fill.size_ = 1;
|
||||
return fill;
|
||||
}
|
||||
};
|
||||
} // namespace detail
|
||||
|
||||
@@ -1233,8 +1226,7 @@ template <typename Char> struct basic_format_specs {
|
||||
type(0),
|
||||
align(align::none),
|
||||
sign(sign::none),
|
||||
alt(false),
|
||||
fill(detail::fill_t<Char>::make()) {}
|
||||
alt(false) {}
|
||||
};
|
||||
|
||||
using format_specs = basic_format_specs<char>;
|
||||
|
||||
Reference in New Issue
Block a user