refactor: remove redundant template argument

This commit is contained in:
ToruNiina
2020-01-12 23:07:17 +09:00
parent 81ed4c0e9d
commit 490abe04fd

View File

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