Skip to content

ashaduri_csv_parser-1.1.0

Latest

Choose a tag to compare

@ashaduri ashaduri released this 25 Apr 08:18
· 1 commit to main since this release

Changes:

  • Csv::Parser now accepts behavior policy as a template argument; the policy is also passed to Cell classes during construction so that they can use it; this replaces the previous CellTrait facility.
  • The new behavior policy mechanism allows user-defined number parsing functions, making the number parsing customizable and allowing libraries like fast_float to be used.
  • Two policies are implemented - locale-aware (previous behavior, default), and locale-unaware (using std::from_chars() with newer compilers).
  • Made more methods constexpr; integer parsing can be done at compile-time now (when using C++23+), and float/double compile-time parsing can be done using fast_float if needed.
  • CellStringBuffer minimum size is relaxed so that it can be the size of collapsed string (instead of uncollapsed, previously).
  • CellStringBuffer constructor now throws if the buffer size is insufficient - this causes compile-time error and allows error detection earlier in the call chain.
  • CellStringBuffer has been refactored to remove isValid() and getOptionalStringView() - these no longer make sense as the buffer is always valid and the string view is always available.