diff options
| author | 2019-01-25 15:17:37 +0000 | |
|---|---|---|
| committer | 2019-01-25 15:17:37 +0000 | |
| commit | 0fab643858dfd2183cb545243d230d3ff84446b2 (patch) | |
| tree | c50161f9e2539255132b90301b6f6ad01ef2224c /include/numeric.h | |
| parent | Remove 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.h | 6 |
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) { |
