From b34e0fb12f41c328cc5187bdfd6227175c95e40c Mon Sep 17 00:00:00 2001 From: Gilles Chabert Date: Fri, 1 Mar 2019 23:27:03 +0100 Subject: [PATCH] Fixing compilation problems under mingw --- plugins/optim/src/data/ibex_CovOptimData.h | 4 ++-- plugins/solver/src/ibex_CovSolverData.h | 4 ++-- plugins/solver/src/ibex_DefaultSolver.cpp | 2 ++ plugins/solver/src/ibex_DefaultSolver.h | 8 ++++++-- src/data/ibex_Cov.h | 4 ++-- src/data/ibex_CovIBUList.h | 4 ++-- src/data/ibex_CovIUList.h | 4 ++-- src/data/ibex_CovList.h | 4 ++-- src/data/ibex_CovManifold.h | 4 ++-- 9 files changed, 22 insertions(+), 16 deletions(-) diff --git a/plugins/optim/src/data/ibex_CovOptimData.h b/plugins/optim/src/data/ibex_CovOptimData.h index 40d404e01..e9175397f 100644 --- a/plugins/optim/src/data/ibex_CovOptimData.h +++ b/plugins/optim/src/data/ibex_CovOptimData.h @@ -77,7 +77,7 @@ class CovOptimData : public CovList { /** * \brief Display the format of a CovOptimData file. */ - static string format(); + static std::string format(); /** * \brief COVOptimData file format version. @@ -161,7 +161,7 @@ class CovOptimData : public CovList { */ static std::ofstream* write(const char* filename, const CovOptimData& cov, std::stack& format_id, std::stack& format_version); - static void format(std::stringstream& ss, const string& title, std::stack& format_id, std::stack& format_version); + static void format(std::stringstream& ss, const std::string& title, std::stack& format_id, std::stack& format_version); /* read the variable names */ static void read_vars(std::ifstream& f, size_t n, std::vector& var_names); diff --git a/plugins/solver/src/ibex_CovSolverData.h b/plugins/solver/src/ibex_CovSolverData.h index 4bb403b42..86c655bcf 100644 --- a/plugins/solver/src/ibex_CovSolverData.h +++ b/plugins/solver/src/ibex_CovSolverData.h @@ -199,7 +199,7 @@ class CovSolverData : public CovManifold { /** * \brief Display the format of a CovSolverData file. */ - static string format(); + static std::string format(); /** * \brief COVSolverData file format version. @@ -219,7 +219,7 @@ class CovSolverData : public CovManifold { */ static std::ofstream* write(const char* filename, const CovSolverData& cov, std::stack& format_id, std::stack& format_version); - static void format(std::stringstream& ss, const string& title, std::stack& format_id, std::stack& format_version); + static void format(std::stringstream& ss, const std::string& title, std::stack& format_id, std::stack& format_version); /* read the variable names */ static void read_vars(std::ifstream& f, size_t n, std::vector& var_names); diff --git a/plugins/solver/src/ibex_DefaultSolver.cpp b/plugins/solver/src/ibex_DefaultSolver.cpp index 3bb7a90c8..2e568f4ab 100644 --- a/plugins/solver/src/ibex_DefaultSolver.cpp +++ b/plugins/solver/src/ibex_DefaultSolver.cpp @@ -28,6 +28,8 @@ using namespace std; namespace ibex { +double DefaultSolver::default_eps_x_max = POS_INFINITY; + #define SQUARE_EQ_SYSTEM_TAG 1 namespace { diff --git a/plugins/solver/src/ibex_DefaultSolver.h b/plugins/solver/src/ibex_DefaultSolver.h index cf02e1c90..727da80f5 100644 --- a/plugins/solver/src/ibex_DefaultSolver.h +++ b/plugins/solver/src/ibex_DefaultSolver.h @@ -55,8 +55,12 @@ class DefaultSolver : private Memory, public Solver { /** * \brief Default maximal width: +oo. */ - static constexpr double default_eps_x_max = POS_INFINITY; - + + // TODO: constexpr definition not possible with FILIB (POS_INFINITY is not + // a constexpr with FILIB). + //static constexpr double default_eps_x_max = POS_INFINITY; + static double default_eps_x_max; + /** * Default random seed: 1.0. */ diff --git a/src/data/ibex_Cov.h b/src/data/ibex_Cov.h index 433a28166..639d077f8 100644 --- a/src/data/ibex_Cov.h +++ b/src/data/ibex_Cov.h @@ -61,7 +61,7 @@ class Cov { /** * \brief Display the COV file format. */ - static string format(); + static std::string format(); /** * \brief COV file format version. @@ -89,7 +89,7 @@ class Cov { */ static std::ofstream* write(const char* filename, const Cov& cov, std::stack& format_id, std::stack& format_version); - static void format(std::stringstream& ss, const string& title, std::stack& format_id, std::stack& format_version); + static void format(std::stringstream& ss, const std::string& title, std::stack& format_id, std::stack& format_version); static void read_signature(std::ifstream& f); diff --git a/src/data/ibex_CovIBUList.h b/src/data/ibex_CovIBUList.h index 1d97beaa4..d6a2f1b8a 100644 --- a/src/data/ibex_CovIBUList.h +++ b/src/data/ibex_CovIBUList.h @@ -131,7 +131,7 @@ class CovIBUList : public CovIUList { /** * \brief Display the format of a CovIBUList file. */ - static string format(); + static std::string format(); /** * \brief COVIBUList file format version. @@ -159,7 +159,7 @@ class CovIBUList : public CovIUList { */ static std::ofstream* write(const char* filename, const CovIBUList& cov, std::stack& format_id, std::stack& format_version); - static void format(std::stringstream& ss, const string& title, std::stack& format_id, std::stack& format_version); + static void format(std::stringstream& ss, const std::string& title, std::stack& format_id, std::stack& format_version); /** * \brief Subformat level. diff --git a/src/data/ibex_CovIUList.h b/src/data/ibex_CovIUList.h index afa9e04f7..faf4e962f 100644 --- a/src/data/ibex_CovIUList.h +++ b/src/data/ibex_CovIUList.h @@ -120,7 +120,7 @@ class CovIUList : public CovList { /** * \brief Display the format of a CovIUList file. */ - static string format(); + static std::string format(); /** * \brief COVIUList file format version. @@ -139,7 +139,7 @@ class CovIUList : public CovList { */ static std::ofstream* write(const char* filename, const CovIUList& cov, std::stack& format_id, std::stack& format_version); - static void format(std::stringstream& ss, const string& title, std::stack& format_id, std::stack& format_version); + static void format(std::stringstream& ss, const std::string& title, std::stack& format_id, std::stack& format_version); /** * \brief Subformat level. diff --git a/src/data/ibex_CovList.h b/src/data/ibex_CovList.h index cdb6b6fa1..e26b41d87 100644 --- a/src/data/ibex_CovList.h +++ b/src/data/ibex_CovList.h @@ -75,7 +75,7 @@ class CovList : public Cov { /** * \brief Display the format of a CovList file. */ - static string format(); + static std::string format(); /** * \brief COVList file format version. @@ -93,7 +93,7 @@ class CovList : public Cov { */ static std::ofstream* write(const char* filename, const CovList& cov, std::stack& format_id, std::stack& format_version); - static void format(std::stringstream& ss, const string& title, std::stack& format_id, std::stack& format_version); + static void format(std::stringstream& ss, const std::string& title, std::stack& format_id, std::stack& format_version); static IntervalVector read_box(std::ifstream& f, size_t n); diff --git a/src/data/ibex_CovManifold.h b/src/data/ibex_CovManifold.h index c1866ad20..efe41280a 100644 --- a/src/data/ibex_CovManifold.h +++ b/src/data/ibex_CovManifold.h @@ -239,7 +239,7 @@ class CovManifold : public CovIBUList { /** * \brief Display the format of a CovManifold file. */ - static string format(); + static std::string format(); /** * \brief COVManifold file format version. @@ -258,7 +258,7 @@ class CovManifold : public CovIBUList { */ static std::ofstream* write(const char* filename, const CovManifold& cov, std::stack& format_id, std::stack& format_version); - static void format(std::stringstream& ss, const string& title, std::stack& format_id, std::stack& format_version); + static void format(std::stringstream& ss, const std::string& title, std::stack& format_id, std::stack& format_version); /* read parameters of the parametric proof */ static VarSet read_varset(std::ifstream& f, size_t n, size_t m);