Skip to content

Remove floating-point to_numeric specializations #1

@csparker247

Description

@csparker247

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions