You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The educelab::to_numeric template function converts a std::string_view to various numeric types. This function is essentially a convenience wrapper around std::from_chars. Currently, support for std::from_chars for floating-point types is not widely deployed. As such, we include template specializations for floating point types which use the std::sto* functions for conversion. This includes the added cost of converting the std::string_view to a std::string, which is less than ideal for parsing. These specializations need to be removed once std::from_chars is widely supported by the various compilers.
The
educelab::to_numeric
template function converts astd::string_view
to various numeric types. This function is essentially a convenience wrapper aroundstd::from_chars
. Currently, support forstd::from_chars
for floating-point types is not widely deployed. As such, we include template specializations for floating point types which use thestd::sto*
functions for conversion. This includes the added cost of converting thestd::string_view
to astd::string
, which is less than ideal for parsing. These specializations need to be removed oncestd::from_chars
is widely supported by the various compilers.The text was updated successfully, but these errors were encountered: