-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I did consider the parser returning std::optional, but I think it is situational whether one would look nicer than the other. For example, using value_or() in the first example would not work since I do not want to print anything if the row is invalid, so I would still have to check the optional, and than add another line to decompose the tuple resulting in more lines. Notice that p.valid() can also be used to check if the file was open within the constructor. Fetching error messages would also be slightly more complicated. As for exceptions, I do no think it could work at all in this iteration loop since it would break the loop even if I catch it, and again, file not open would need to be handled too, and making it throw would require me to enclose the whole parser in a try/catch block since the constructor would throw that exception, one of the problems I had with the fast-cpp-csv-parser. Its all a trade-off, but I think I will stick with p.valid(), tho I will consider it still.