🧹 utils: modernize floating point typetrait

This commit is contained in:
Vladislav Nepogodin 2024-07-03 01:32:00 +04:00
parent f384932b58
commit 7bcd6bba4c
No known key found for this signature in database
GPG Key ID: B62C3D10C54D5DA9

View File

@ -83,7 +83,7 @@ inline T to_int(const std::string_view& str) {
}
template <typename T = double>
requires std::is_floating_point<T>::value
requires std::is_floating_point_v<T>
inline T to_floating(const std::string_view& str) {
T result = 0;
std::from_chars(str.data(), str.data() + str.size(), result);