16template <std::
floating_po
int F>
19 std::array<char, bufmaxsize + 1>
s;
22 static constexpr char end =
'\n';
28 throw read_error(
"csv::read_row extraction failed: " +
29 std::to_string(
is.bad()) +
" " +
30 std::to_string(
is.fail()) +
" " +
31 std::to_string(
is.eof()));
42 throw read_error(
"csv::read_row unexpected character '" +
43 std::string{*ptr} +
"'");
46 std::copy(ptr + 1,
static_cast<const char *
>(
bufend),
s.data());
61 if (
ec != std::errc{})
62 throw read_error(
"csv::read_row conversion failed '" +
64 "': " + std::make_error_code(
ec).message());
83 throw read_error(
"csv::read_row conversion failed '" +
85 "': " + std::to_string(
errno));
92 throw read_error(
"csv::read_row line not fully consumed");
101#ifdef ALPAQA_WITH_QUAD_PRECISION
113template <std::
floating_po
int F>
122template <std::
floating_po
int F>
std::vector< F > read_row_std_vector(std::istream &is, char sep)
void read_row_impl(std::istream &is, Eigen::Ref< Eigen::VectorX< F > > v, char sep)
static constexpr std::streamsize bufmaxsize
static const char * read_single(const char *bufbegin, char *bufend, F &v)
bool done(std::istream &is) const
std::array< char, bufmaxsize+1 > s
F read(std::istream &is, char sep)
static constexpr char end
static void strtod_ovl(const char *str, char **str_end, double &v)
static void strtod_ovl(const char *str, char **str_end, long double &v)
static void strtod_ovl(const char *str, char **str_end, float &v)
void check_end(std::istream &is) const