Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove floating-point to_numeric specializations #1

Open
csparker247 opened this issue May 23, 2023 · 0 comments
Open

Remove floating-point to_numeric specializations #1

csparker247 opened this issue May 23, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@csparker247
Copy link
Member

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.

@csparker247 csparker247 added the enhancement New feature or request label May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant