The Battle for Wesnoth  1.19.7+dev
Typedefs | Functions | Variables
utils::charconv Namespace Reference

Typedefs

using chars_format = charconv_impl::chars_format
 
using from_chars_result = charconv_impl::from_chars_result
 
using to_chars_result = charconv_impl::to_chars_result
 

Functions

template<typename... T>
to_chars_result to_chars (char *first, char *last, T &&... value)
 
template<typename T >
std::enable_if_t< std::is_integral_v< T >, from_chars_resultfrom_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_resultfrom_chars (const char *first, const char *last, T &value, chars_format fmt=chars_format::general)
 

Variables

template<class T >
constexpr size_t buffer_size = 50
 

Typedef Documentation

◆ chars_format

using utils::charconv::chars_format = typedef charconv_impl::chars_format

Definition at line 50 of file charconv.hpp.

◆ from_chars_result

using utils::charconv::from_chars_result = typedef charconv_impl::from_chars_result

Definition at line 51 of file charconv.hpp.

◆ to_chars_result

using utils::charconv::to_chars_result = typedef charconv_impl::to_chars_result

Definition at line 52 of file charconv.hpp.

Function Documentation

◆ from_chars() [1/2]

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 
)

Definition at line 68 of file charconv.hpp.

Referenced by from_chars().

◆ from_chars() [2/2]

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 
)

◆ to_chars()

template<typename... T>
to_chars_result utils::charconv::to_chars ( char *  first,
char *  last,
T &&...  value 
)

Definition at line 55 of file charconv.hpp.

Referenced by utils::charconv_buffer< TNum >::set_value().

Variable Documentation

◆ buffer_size

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

Definition at line 79 of file charconv.hpp.