From 0fab643858dfd2183cb545243d230d3ff84446b2 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 25 Jan 2019 15:17:37 +0000 Subject: Convert repetitive functions to use C++11 variadic templates. --- include/numeric.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/numeric.h') diff --git a/include/numeric.h b/include/numeric.h index cc9f9cc9b..317a55bce 100644 --- a/include/numeric.h +++ b/include/numeric.h @@ -53,6 +53,12 @@ class Numeric::Numeric /** Add a parameter to the numeric. The parameter will be converted to a string first with ConvToStr(). * @param x Parameter to add */ + template + Numeric& push(const T1& x1, T2... x2) + { + return push(x1).push(std::forward(x2)...); + } + template Numeric& push(const T& x) { -- cgit v1.3.1-10-gc9f91