From d883af001f1ec38942d2c6683252722e1ec28beb Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 4 Jul 2015 03:20:51 +0100 Subject: [PATCH] add standard iter for const arrays --- octa/format.hh | 13 ------------- octa/range.hh | 5 +++++ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/octa/format.hh b/octa/format.hh index 425fd9f..bfe30d5 100644 --- a/octa/format.hh +++ b/octa/format.hh @@ -416,19 +416,6 @@ 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, diff --git a/octa/range.hh b/octa/range.hh index af2e4db..315babc 100644 --- a/octa/range.hh +++ b/octa/range.hh @@ -932,6 +932,11 @@ PointerRange iter(T (&array)[N]) { return PointerRange(array, N); } +template +PointerRange iter(const T (&array)[N]) { + return PointerRange(array, N); +} + template struct EnumeratedValue { S index;