mirror of
https://github.com/fmtlib/fmt.git
synced 2025-02-04 06:39:59 +00:00
Remove xchar.h include from ostream.h
This commit is contained in:
parent
ac0d9d5fe2
commit
4e39e13085
@ -11,7 +11,6 @@
|
|||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
#include "format.h"
|
#include "format.h"
|
||||||
#include "xchar.h"
|
|
||||||
|
|
||||||
FMT_BEGIN_NAMESPACE
|
FMT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@ -141,8 +140,10 @@ void print(std::ostream& os, format_string<Args...> fmt, Args&&... args) {
|
|||||||
|
|
||||||
FMT_MODULE_EXPORT
|
FMT_MODULE_EXPORT
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
void print(std::wostream& os, wformat_string<Args...> fmt, Args&&... args) {
|
void print(std::wostream& os,
|
||||||
vprint(os, fmt, fmt::make_wformat_args(args...));
|
basic_format_string<wchar_t, type_identity_t<Args>...> fmt,
|
||||||
|
Args&&... args) {
|
||||||
|
vprint(os, fmt, fmt::make_format_args<buffer_context<wchar_t>>(args...));
|
||||||
}
|
}
|
||||||
|
|
||||||
FMT_END_NAMESPACE
|
FMT_END_NAMESPACE
|
||||||
|
@ -330,9 +330,11 @@ TEST(xchar_test, color) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST(xchar_test, ostream) {
|
TEST(xchar_test, ostream) {
|
||||||
|
#if !FMT_GCC_VERSION || FMT_GCC_VERSION >= 409
|
||||||
std::wostringstream wos;
|
std::wostringstream wos;
|
||||||
fmt::print(wos, L"Don't {}!", L"panic");
|
fmt::print(wos, L"Don't {}!", L"panic");
|
||||||
EXPECT_EQ(L"Don't panic!", wos.str());
|
EXPECT_EQ(wos.str(), L"Don't panic!");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(xchar_test, to_wstring) { EXPECT_EQ(L"42", fmt::to_wstring(42)); }
|
TEST(xchar_test, to_wstring) { EXPECT_EQ(L"42", fmt::to_wstring(42)); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user