libfly  6.2.2
C++20 utility library for Linux, macOS, and Windows
fly::detail::Converter< T > Struct Template Reference

#include <converter.hpp>

Static Public Member Functions

static std::optional< T > convert (const std::string &value)
 

Detailed Description

template<typename T>
struct fly::detail::Converter< T >

Helper struct to convert a std::string to a plain-old-data type, e.g. int or float.

Ideally, this entire helper can be removed when the STL supports floating-point types with std::from_chars. However, only integral types are currently supported. Thus, integral types will use std::from_chars, and floating-point types will use the std::stof family of functions.

https://en.cppreference.com/w/cpp/compiler_support

Author
Timothy Flynn (trfly.nosp@m.nn89.nosp@m.@pm.m.nosp@m.e)
Version
March 21, 2019

The documentation for this struct was generated from the following file: