diff --git a/include/fmt/core.h b/include/fmt/core.h index 0318afc7..f96ce3a1 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1841,14 +1841,6 @@ inline auto format_to_n(OutputIt out, size_t n, const S& format_str, Returns the number of characters in the output of ``format(format_str, args...)``. */ -template ::value)> -inline size_t formatted_size(const S& format_str, Args&&... args) { - const auto& vargs = fmt::make_args_checked(format_str, args...); - detail::counting_buffer<> buf; - detail::vformat_to(buf, to_string_view(format_str), vargs); - return buf.count(); -} template inline size_t formatted_size(string_view format_str, Args&&... args) { diff --git a/test/enforce-compiletime-test.cc b/test/enforce-compiletime-test.cc index 4b2e62b8..4ae943e0 100644 --- a/test/enforce-compiletime-test.cc +++ b/test/enforce-compiletime-test.cc @@ -46,8 +46,6 @@ void TestFormatApi() { wchar_t wbuffer[4]; (void)fmt::format_to_n(wbuffer, 3, FMT_STRING(L"{}"), 12345); - - (void)fmt::formatted_size(FMT_STRING("{}"), 42); } void TestLiteralsApi() { #if FMT_USE_UDL_TEMPLATE