Fix Visual Studio 2019 warnings in pedantic compilation mode (/W4 /WX)

This commit is contained in:
Ivan Shynkarenka
2019-05-10 14:58:22 +03:00
parent 87be890e07
commit db6f3d5d11
5 changed files with 41 additions and 8 deletions

View File

@@ -79,7 +79,7 @@ std::string concat_to_string(Ts&& ... args)
template<typename T, typename U>
T from_string(const std::string& str, U&& opt)
{
T v(std::forward<U>(opt));
T v(static_cast<T>(std::forward<U>(opt)));
std::istringstream iss(str);
iss >> v;
return v;