Add check for CompiledFormat to avoid ambiguous call

This commit is contained in:
Dmitriy Kurkin 2020-04-14 14:50:28 +08:00 committed by Victor Zverovich
parent fdcf7870a2
commit a9d62d3f35

View File

@ -576,7 +576,9 @@ OutputIt format_to(OutputIt out, const CompiledFormat& cf,
} }
template <typename OutputIt, typename CompiledFormat, typename... Args, template <typename OutputIt, typename CompiledFormat, typename... Args,
FMT_ENABLE_IF(internal::is_output_iterator<OutputIt>::value)> FMT_ENABLE_IF(internal::is_output_iterator<OutputIt>::value &&
std::is_base_of<internal::basic_compiled_format,
CompiledFormat>::value)>
format_to_n_result<OutputIt> format_to_n(OutputIt out, size_t n, format_to_n_result<OutputIt> format_to_n(OutputIt out, size_t n,
const CompiledFormat& cf, const CompiledFormat& cf,
const Args&... args) { const Args&... args) {