Remove formatted_size overlaod accepting compile-time strings

This commit is contained in:
Walter Gray 2020-12-12 14:57:59 -08:00
parent b8ebadd3ac
commit 098de0d54f
2 changed files with 0 additions and 10 deletions

View File

@ -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 <typename S, typename... Args,
FMT_ENABLE_IF(is_compile_string<S>::value)>
inline size_t formatted_size(const S& format_str, Args&&... args) {
const auto& vargs = fmt::make_args_checked<Args...>(format_str, args...);
detail::counting_buffer<> buf;
detail::vformat_to(buf, to_string_view(format_str), vargs);
return buf.count();
}
template <typename... Args>
inline size_t formatted_size(string_view format_str, Args&&... args) {

View File

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