ashtum / lazycsv

A fast, lightweight and single-header C++ csv parser library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with instantiating lazycsv::parser

JackBotBuilt opened this issue · comments

When compiling a project that requires lazy csv I get the following issue:

In instantiation of ‘class lazycsv::parser<lazycsv::mmap_source, lazycsv::has_header<false>, lazycsv::delimiter<','>, lazycsv::trim_chars<' ', '\011'> >’:

../subprojects/lazycsv/include/lazycsv.hpp:367:11: error: ‘value’ is not a member of ‘lazycsv::trim_chars<' ', '\011'>’ 367 | using cell_iterator = detail::fw_iterator<cell, detail::chunk_cells<delimiter::value, quote_char::value>>; | ^~~~~~~~~~~~~ At global scope:

I am not sure what to make of it so any help would be greatly appreciated.

It seems you just forgot to pass lazycsv::quote_char<'"'>. Using it like the following should resolve the issue:

using parser_t = lazycsv::parser<
    lazycsv::mmap_source,
    lazycsv::has_header<false>,
    lazycsv::delimiter<','>,
    lazycsv::quote_char<'"'>,
    lazycsv::trim_chars<' ', '\011'>>;