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_; }
|
T value() const { return value_; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// template <typename Char>
|
||||||
|
// using fill_spec = format_spec<Char, fill_tag>;
|
||||||
template <typename Char>
|
template <typename Char>
|
||||||
class fill_spec : public format_spec<Char, fill_tag> {
|
class fill_spec : public format_spec<Char, fill_tag> {
|
||||||
public:
|
public:
|
||||||
explicit fill_spec(Char value) : format_spec<Char, fill_tag>(value) {}
|
explicit fill_spec(Char value) : format_spec<Char, fill_tag>(value) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
using width_spec = format_spec<unsigned, width_tag>;
|
typedef format_spec<unsigned, width_tag> width_spec;
|
||||||
using type_spec = format_spec<char, type_tag>;
|
typedef format_spec<char, type_tag> type_spec;
|
||||||
|
|
||||||
class fill_spec_factory {
|
class fill_spec_factory {
|
||||||
public:
|
public:
|
||||||
|
@ -781,7 +781,7 @@ TEST(UtilTest, WindowsError) {
|
|||||||
TEST(UtilTest, ReportWindowsError) {
|
TEST(UtilTest, ReportWindowsError) {
|
||||||
fmt::MemoryWriter out;
|
fmt::MemoryWriter out;
|
||||||
fmt::internal::format_windows_error(out, ERROR_FILE_EXISTS, "test error");
|
fmt::internal::format_windows_error(out, ERROR_FILE_EXISTS, "test error");
|
||||||
out << '\n';
|
out.write('\n');
|
||||||
EXPECT_WRITE(stderr,
|
EXPECT_WRITE(stderr,
|
||||||
fmt::report_windows_error(ERROR_FILE_EXISTS, "test error"), out.str());
|
fmt::report_windows_error(ERROR_FILE_EXISTS, "test error"), out.str());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user