Skip to content

Commit 26d4c50

Browse files
authored
fix: replace uses of deprecated has_formatter
1 parent 00b56e9 commit 26d4c50

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

include/mrdocs/Support/Handlebars.hpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,10 @@ class MRDOCS_DECL OutputRef
218218
@return A reference to this object
219219
*/
220220
template <class T>
221-
requires fmt::has_formatter<T, fmt::format_context>::value
222-
friend
223-
OutputRef&
224-
operator<<( OutputRef& os, T v )
225-
{
226-
std::string s = fmt::format( "{}", v );
227-
return os.write_impl( s );
221+
requires fmt::is_formattable<T>::value
222+
friend OutputRef &operator<<(OutputRef &os, T v) {
223+
std::string s = fmt::format("{}", v);
224+
return os.write_impl(s);
228225
}
229226

230227
void

src/test_suite/detail/decomposer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ namespace test_suite::detail
5353
out += '\"';
5454
}
5555
#ifdef MRDOCS_TEST_HAS_FMT
56-
if constexpr (fmt::has_formatter<T, fmt::format_context>::value) {
56+
if constexpr (fmt::is_formattable<T>::value) {
5757
out += fmt::format("{}", value);
5858
} else
5959
#endif

0 commit comments

Comments
 (0)