From 4d0431c5e4dc61f249b15bf952a28adec759f2e4 Mon Sep 17 00:00:00 2001 From: schoetbi Date: Tue, 3 Jul 2018 09:26:13 +0200 Subject: [PATCH] exprtk.hpp: fixed instantiation for integer type --- exprtk.hpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/exprtk.hpp b/exprtk.hpp index f55657a..7dd90e0 100644 --- a/exprtk.hpp +++ b/exprtk.hpp @@ -826,6 +826,12 @@ namespace exprtk return static_cast(v); } + template + inline int to_int32_impl(const T v, int_type_tag) + { + return static_cast(v); + } + template inline long long int to_int64_impl(const T v, real_type_tag) { @@ -894,7 +900,7 @@ namespace exprtk template inline T expm1_impl(const T v, int_type_tag) { - return T(std::exp(v)) - T(1); + return T(std::exp(v)) - T(1); } template @@ -1337,6 +1343,10 @@ namespace exprtk template inline T cot_impl(const T , int_type_tag) { return std::numeric_limits::quiet_NaN(); } template inline T sec_impl(const T , int_type_tag) { return std::numeric_limits::quiet_NaN(); } template inline T csc_impl(const T , int_type_tag) { return std::numeric_limits::quiet_NaN(); } + template inline T r2d_impl(const T v, int_type_tag) { return std::numeric_limits::quiet_NaN(); } + template inline T d2r_impl(const T v, int_type_tag) { return std::numeric_limits::quiet_NaN(); } + template inline T d2g_impl(const T v, int_type_tag) { return std::numeric_limits::quiet_NaN(); } + template inline T g2d_impl(const T v, int_type_tag) { return std::numeric_limits::quiet_NaN(); } template inline bool is_integer_impl(const T& v, real_type_tag) @@ -4992,6 +5002,11 @@ namespace exprtk return std::not_equal_to()(0.0,v); } + inline bool is_true(const int v) + { + return std::not_equal_to()(0,v); + } + inline bool is_true(const long double v) { return std::not_equal_to()(0.0L,v);