Skip to content
Snippets Groups Projects
Commit 126dd8fd authored by Soeren Peters's avatar Soeren Peters
Browse files

Add missing fromstring method to StringUtil. Set static runtime for boost only on windows machines.

parent c081c694
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,9 @@ function(linkBoost components)
set(Boost_USE_STATIC_RUNTIME OFF)
else()
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON)
if(WIN32)
set(Boost_USE_STATIC_RUNTIME ON)
endif()
endif()
set(Boost_USE_MULTITHREADED ON)
......
......@@ -36,6 +36,16 @@ public:
static BASICS_EXPORT bool endsWith(const std::string &input, const std::string &end);
template<class T>
static T fromString(const std::string& s)
{
std::istringstream stream (s);
T t;
stream >> t;
return t;
}
private:
StringUtil() = default;
;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment