Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why template class Reader ? #35

Open
reder2000 opened this issue Oct 21, 2022 · 1 comment
Open

why template class Reader ? #35

reder2000 opened this issue Oct 21, 2022 · 1 comment

Comments

@reder2000
Copy link
Contributor

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 ?

@mariusgreuel
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants