fix wide string formatting

This commit is contained in:
Walter Gray 2020-11-30 10:49:15 -08:00
parent e05c8fcffe
commit f76c64abe5
2 changed files with 2 additions and 2 deletions

View File

@ -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>

View File

@ -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;