From 45a1990babb60ce76bf8723308c57568886afba6 Mon Sep 17 00:00:00 2001 From: Daumantas Kavolis <12998363+dkavolis@users.noreply.github.com> Date: Thu, 26 Sep 2019 15:36:56 +0100 Subject: [PATCH] fix ambigous olverloads for compiled format --- include/fmt/core.h | 3 ++- include/fmt/format.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 0d7d15b5..c8b987af 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1409,7 +1409,8 @@ inline std::basic_string vformat( */ // Pass char_t as a default template parameter instead of using // std::basic_string> to reduce the symbol size. -template > +template , + FMT_ENABLE_IF(internal::is_string::value)> inline std::basic_string format(const S& format_str, Args&&... args) { return internal::vformat( to_string_view(format_str), diff --git a/include/fmt/format.h b/include/fmt/format.h index e198233b..11da7a76 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -3351,7 +3351,8 @@ inline typename buffer_context::iterator vformat_to( } template ::value, char_t>> + typename Char = char_t, + FMT_ENABLE_IF(internal::is_string::value)> inline typename buffer_context::iterator format_to( basic_memory_buffer& buf, const S& format_str, Args&&... args) { internal::check_format_string(format_str);