MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
text_parse.hpp File Reference
#include <charconv>
#include <cstddef>
#include <cstdlib>
#include <limits>
#include <sstream>
#include <string>
#include <string_view>
#include <system_error>
#include <type_traits>

Classes

class  mtl::io::detail::token_cursor
 Splits a line into whitespace-separated tokens, one at a time. More...

Namespaces

namespace  mtl
namespace  mtl::io
namespace  mtl::io::detail

Functions

bool mtl::io::detail::is_space (char ch) noexcept
bool mtl::io::detail::is_blank (std::string_view line) noexcept
 True if the line holds nothing but whitespace.
bool mtl::io::detail::parse_index (std::string_view tok, std::size_t &out, std::size_t max=std::numeric_limits< std::size_t >::max()) noexcept
 A non-negative decimal integer, the whole token.
template<typename T>
bool mtl::io::detail::parse_float_strto (const char *first, const char *last, T &out)
 The strtof/strtod/strtold reading of [first, last), a token without a leading '+': parse_value's path where std::from_chars is missing, or where it reports a value out of range.
template<typename T>
bool mtl::io::detail::parse_value (std::string_view tok, T &out)
 One value, the whole token.