constrain templated format_to on proper format string type.

Signed-off-by: Daniela Engert <dani@ngrt.de>
This commit is contained in:
Daniela Engert authored and Victor Zverovich committed 2018-09-26 21:05:47 -07:00
1 parent d7f17613f5
commit 4cf21f58b2
3 files changed
+5 -5

No files matched your search

+2 -1
View File
@@ -3507,7 +3507,8 @@ inline OutputIt vformat_to(
\endrst
*/
template <typename OutputIt, typename String, typename... Args>
inline OutputIt format_to(OutputIt out, const String &format_str,
inline typename std::enable_if<internal::is_format_string<String>::value, OutputIt>::type
format_to(OutputIt out, const String &format_str,
const Args &... args) {
internal::check_format_string<Args...>(format_str);
typedef typename format_context_t<OutputIt, FMT_CHAR(String) >::type context_t;