mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Improve compatibility with old compilers and fix test
This commit is contained in:
parent
aea5d3ab00
commit
aaa0fc396b
@ -1655,14 +1655,16 @@ class format_spec {
|
||||
T value() const { return value_; }
|
||||
};
|
||||
|
||||
// template <typename Char>
|
||||
// using fill_spec = format_spec<Char, fill_tag>;
|
||||
template <typename Char>
|
||||
class fill_spec : public format_spec<Char, fill_tag> {
|
||||
public:
|
||||
explicit fill_spec(Char value) : format_spec<Char, fill_tag>(value) {}
|
||||
};
|
||||
|
||||
using width_spec = format_spec<unsigned, width_tag>;
|
||||
using type_spec = format_spec<char, type_tag>;
|
||||
typedef format_spec<unsigned, width_tag> width_spec;
|
||||
typedef format_spec<char, type_tag> type_spec;
|
||||
|
||||
class fill_spec_factory {
|
||||
public:
|
||||
|
@ -781,7 +781,7 @@ TEST(UtilTest, WindowsError) {
|
||||
TEST(UtilTest, ReportWindowsError) {
|
||||
fmt::MemoryWriter out;
|
||||
fmt::internal::format_windows_error(out, ERROR_FILE_EXISTS, "test error");
|
||||
out << '\n';
|
||||
out.write('\n');
|
||||
EXPECT_WRITE(stderr,
|
||||
fmt::report_windows_error(ERROR_FILE_EXISTS, "test error"), out.str());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user