Skip to content

Commit 047c179

Browse files
authored
Make the formatter for IStringable const (#1270)
1 parent ed69c4b commit 047c179

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

strings/base_stringable_format.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
#ifdef __cpp_lib_format
33
template <typename FormatContext>
4-
auto std::formatter<winrt::Windows::Foundation::IStringable, wchar_t>::format(winrt::Windows::Foundation::IStringable const& obj, FormatContext& fc)
4+
auto std::formatter<winrt::Windows::Foundation::IStringable, wchar_t>::format(winrt::Windows::Foundation::IStringable const& obj, FormatContext& fc) const
55
{
66
return std::formatter<winrt::hstring, wchar_t>::format(obj.ToString(), fc);
77
}

strings/base_stringable_format_1.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ template <>
44
struct std::formatter<winrt::Windows::Foundation::IStringable, wchar_t> : std::formatter<winrt::hstring, wchar_t>
55
{
66
template <typename FormatContext>
7-
auto format(winrt::Windows::Foundation::IStringable const& obj, FormatContext& fc);
7+
auto format(winrt::Windows::Foundation::IStringable const& obj, FormatContext& fc) const;
88
};
99
#endif

0 commit comments

Comments
 (0)