From 37367b3c093ca75003629e1f8bd179a0fccd543d Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 4 Jul 2015 02:30:46 +0100 Subject: [PATCH] range format fixes --- octa/format.hh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/octa/format.hh b/octa/format.hh index a01e39b..425fd9f 100644 --- a/octa/format.hh +++ b/octa/format.hh @@ -393,7 +393,7 @@ namespace detail { FmtRangeTest::value, bool > = true) { - T range(octa::iter(val)); + auto range = octa::iter(val); if (range.empty()) return 0; octa::Ptrdiff ret = 0; octa::Size fmtn = 0; @@ -416,6 +416,19 @@ namespace detail { return ret; } + template + static inline octa::Ptrdiff write_range(R &writer, + const FormatSpec *fl, + const char *sep, + octa::Size seplen, + const T (&arr)[N], + octa::EnableIf< + !FmtRangeTest::value, + bool + > = true) { + return write_range(writer, fl, sep, seplen, octa::iter(arr)); + } + template static inline octa::Ptrdiff write_range(R &, const FormatSpec *, const char *, octa::Size,