-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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.
- Elementary string conversion proposal: P0067R5
- C++17 compiler support (cppreference.com)
- MSVC: Available in MSVC 19.24
- Clang: Available in LLVM 16?
- GCC: Available in gcc 11
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request