BRICKS
Small, useful blocks of code, to build bigger things.
Loading...
Searching...
No Matches
charconv.hpp File Reference
#include <charconv>
#include <limits>
#include <stdexcept>
#include <string>
#include <string_view>
#include "result.hpp"
Include dependency graph for charconv.hpp:

Go to the source code of this file.

Namespaces

namespace  bricks
 

Functions

template<typename T >
auto bricks::to_string (const T &value, std::size_t buffer_size=(std::numeric_limits< T >::digits10+2)) noexcept -> result< std::string, std::errc >
 Exceptionlessly convert a number to a string.
 
template<typename T >
auto bricks::from_string (const std::string_view &str) noexcept -> result< T, std::errc >
 Exceptionlessly convert a string to a number.