csv2 icon indicating copy to clipboard operation
csv2 copied to clipboard

why template class Reader ?

Open reder2000 opened this issue 3 years ago • 1 comments

Recall that : template <class delimiter = delimiter<','>, class quote_character = quote_character<'"'>, class first_row_is_header = first_row_is_header, class trim_policy = trim_policy::trim_whitespace> class Reader

I am not sure about what is the exact benefit of that. For instance, delimiter is a parameter for Cell only. quote_character as well. first_row_is_header is used only once in RowIterator begin() is_trim_char could well be implemented as a std::string+contains(tested char)

I don't think speed would suffer much, and flexibility would be better.

Any opinion ?

reder2000 avatar Oct 21 '22 15:10 reder2000

Same here. I need to change the delimiter at run-time (based on a command-line parameter), and it turns out to be a mess.

mariusgreuel avatar Mar 17 '24 18:03 mariusgreuel