From f46444f106e76908643de50fb4536d84ff4e1026 Mon Sep 17 00:00:00 2001 From: David Adam Date: Wed, 31 Mar 2021 11:21:42 +0800 Subject: [PATCH] tinyexpr: use std:: namespace for older libstdc++ Fixes the build on Ubuntu Xenial 16.04 and CentOS 7. --- src/tinyexpr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tinyexpr.cpp b/src/tinyexpr.cpp index 1dc8165d1..0f92f538d 100644 --- a/src/tinyexpr.cpp +++ b/src/tinyexpr.cpp @@ -38,6 +38,12 @@ #include #include +// Older version of libstdc++ (GCC 5 and before) need this as wutil.h includes common.h, which +// includes , which includes - meaning the functions get included into the std:: +// namespace, and including math.h later does not reimport them. +using std::isnan; +using std::signbit; + // TODO: It would be nice not to rely on a typedef for this, especially one that can only do // functions with two args. using te_fun2 = double (*)(double, double);