fix wide string formatting
This commit is contained in:
parent
e05c8fcffe
commit
f76c64abe5
@ -3828,7 +3828,7 @@ inline std::string to_string(T value) {
|
||||
Converts *value* to ``std::wstring`` using the default format for type *T*.
|
||||
*/
|
||||
template <typename T> inline std::wstring to_wstring(const T& value) {
|
||||
return format(L"{}", value);
|
||||
return format(FMT_STRING(L"{}"), value);
|
||||
}
|
||||
|
||||
template <typename Char, size_t SIZE>
|
||||
|
||||
@ -145,7 +145,7 @@ TEST(FormatTest, ToString) {
|
||||
EXPECT_EQ("foo", fmt::to_string(adl_test::fmt::detail::foo()));
|
||||
}
|
||||
|
||||
//TEST(FormatTest, ToWString) { EXPECT_EQ(L"42", fmt::to_wstring(42)); }
|
||||
TEST(FormatTest, ToWString) { EXPECT_EQ(L"42", fmt::to_wstring(42)); }
|
||||
|
||||
TEST(FormatTest, OutputIterators) {
|
||||
std::list<char> out;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user