From 6c3db6974176788e9ffb31761065df3d689cf28c Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 31 May 2015 16:44:35 +0100 Subject: [PATCH] no need to specialize ToString for objects that provide a range interface (works by default) --- octa/array.h | 7 ------- octa/string.h | 19 ------------------- 2 files changed, 26 deletions(-) diff --git a/octa/array.h b/octa/array.h index 7da91ad..500a3ef 100644 --- a/octa/array.h +++ b/octa/array.h @@ -61,13 +61,6 @@ namespace octa { swap_ranges(each(), v.each()); } - String to_string() const { - String ret("{"); - ret += concat(each(), ", ", ToString()); - ret += "}"; - return move(ret); - } - T p_buf[(N > 0) ? N : 1]; }; } diff --git a/octa/string.h b/octa/string.h index da173c5..bbba350 100644 --- a/octa/string.h +++ b/octa/string.h @@ -331,17 +331,6 @@ namespace octa { } }; - template struct ToString> { - typedef const Vector &ArgType; - typedef String ResultType; - String operator()(ArgType v) { - String ret("{"); - ret += concat(v.each(), ", ", ToString>>()); - ret += "}"; - return move(ret); - } - }; - template struct ToString> { typedef const Pair &ArgType; typedef String ResultType; @@ -355,14 +344,6 @@ namespace octa { } }; - template struct ToString> { - typedef initializer_list ArgType; - typedef String ResultType; - String operator()(ArgType il) { - return move(ToString()(each(il))); - } - }; - template String to_string(const T &v) { return move(ToString>>()(v));