From ab3c00582d7b4cbf287bc7a20198d7baa4098874 Mon Sep 17 00:00:00 2001 From: Anil Tuncel Date: Fri, 20 Oct 2023 18:58:04 +0200 Subject: [PATCH] change string construction for clang --- efel/cppcore/Utils.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/efel/cppcore/Utils.h b/efel/cppcore/Utils.h index c064cb6a..ad7784ed 100644 --- a/efel/cppcore/Utils.h +++ b/efel/cppcore/Utils.h @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include #include "EfelExceptions.h" @@ -86,8 +88,9 @@ inline void efel_assert(bool assertion, const char *message, const char *file, const int line) { if(!assertion){ - using std::string, std::to_string; - string errorMsg = "Assertion fired(" + string(file) + ":" + to_string(line) + "): " + string(message); + std::ostringstream os; + os << "Assertion fired(" << file << ":" << line << "): " << message; + std::string errorMsg = os.str(); throw EfelAssertionError(errorMsg); } }