From 05c2137e867737f3b5903ec5884028dfec1dce56 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 9 Dec 2016 14:06:50 +0000 Subject: Simplify parser templates --- libadhocutil/compileTimeFormatter.h | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/libadhocutil/compileTimeFormatter.h b/libadhocutil/compileTimeFormatter.h index 1a09bb1..d45d662 100644 --- a/libadhocutil/compileTimeFormatter.h +++ b/libadhocutil/compileTimeFormatter.h @@ -144,41 +144,26 @@ namespace AdHoc { } }; - template - struct Parser { + template + struct ParserBase { static auto parse() { - return Buffer(); + return innerparse(); } static auto innerparse() { - return Buffer(); + return Buffer(); } }; + template + struct Parser : public ParserBase { }; + template - struct Parser { - static auto parse() - { - return Buffer(); - } - static auto innerparse() - { - return Buffer(); - } - }; + struct Parser : public ParserBase { }; template - struct Parser { - static auto parse() - { - return Buffer(); - } - static auto innerparse() - { - return Buffer(); - } - }; + struct Parser : public ParserBase{ }; template struct Formatter { -- cgit v1.2.3