aboutsummaryrefslogtreecommitdiff
path: root/include/numeric.h
diff options
context:
space:
mode:
authorGravatar Sadie Powell2019-01-25 15:17:37 +0000
committerGravatar Sadie Powell2019-01-25 15:17:37 +0000
commit0fab643858dfd2183cb545243d230d3ff84446b2 (patch)
treec50161f9e2539255132b90301b6f6ad01ef2224c /include/numeric.h
parentRemove support for the deprecated rfc1459 casemapping, (diff)
Convert repetitive functions to use C++11 variadic templates.
Diffstat (limited to 'include/numeric.h')
-rw-r--r--include/numeric.h6
1 files changed, 6 insertions, 0 deletions
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 <typename T1, typename... T2>
+ Numeric& push(const T1& x1, T2... x2)
+ {
+ return push(x1).push(std::forward<T2>(x2)...);
+ }
+
template <typename T>
Numeric& push(const T& x)
{