The Battle for Wesnoth  1.19.7+dev
Classes | Namespaces | Typedefs | Functions | Variables
charconv.hpp File Reference
#include <boost/version.hpp>
#include <array>
#include <assert.h>
#include <cctype>
#include <string_view>
#include <string>
#include <stdexcept>
#include <charconv>
Include dependency graph for charconv.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  utils::charconv_buffer< TNum >
 

Namespaces

 utils
 
 utils::charconv
 

Typedefs

using utils::charconv::chars_format = charconv_impl::chars_format
 
using utils::charconv::from_chars_result = charconv_impl::from_chars_result
 
using utils::charconv::to_chars_result = charconv_impl::to_chars_result
 

Functions

template<typename... T>
to_chars_result utils::charconv::to_chars (char *first, char *last, T &&... value)
 
template<typename T >
std::enable_if_t< std::is_integral_v< T >, from_chars_result > utils::charconv::from_chars (const char *first, const char *last, T &value, int base=10)
 
template<typename T >
std::enable_if_t< std::is_floating_point_v< T >, from_chars_result > utils::charconv::from_chars (const char *first, const char *last, T &value, chars_format fmt=chars_format::general)
 
void utils::trim_for_from_chars (std::string_view &v)
 
double utils::stod (std::string_view str)
 Same interface as std::stod and meant as a drop in replacement, except: More...
 
int utils::stoi (std::string_view str)
 Same interface as std::stoi and meant as a drop in replacement, except: More...
 

Variables

template<class T >
constexpr size_t utils::charconv::buffer_size = 50