Skip to content

0.4

Pre-release
Pre-release
Compare
Choose a tag to compare
@eliaskosunen eliaskosunen released this 13 Nov 22:25
· 621 commits to master since this release

Planned to be the last 0.x release before 1.0-rc1.

Changes and removals

  • Rework source range handling:
    • Non-views are now accepted as source ranges --
      this includes types like std::string and std::vector<char>
    • Non-reconstructible ranges are now also accepted --
      scanning functions no longer return a reconstructed source range.
      The member function .range() can be used to scan the range again,
      and .reconstruct() reconstructs the range, if possible.
      Other helper member functions are also available.
    • Source ranges are now either taken by const lvalue reference or rvalue reference,
      so they are no longer modified by scanning functions.
      To access the leftover range, use the return value of the scanning function.
  • Rewrite file handling, with hopefully way less bugs this time around
    • Remove file_view and caching ranges
    • Move memory mapped files to the public API
  • Remove default_tag, replace with scan_default function template
  • Remove support for scanf syntax, including scn::scanf and scn::basic_scanf_parse_context.
  • Improve Ranges integration:
    • Move custom Ranges implementation to the public API (out from scn::detail::ranges): scn::custom_ranges
    • Integrate standard library Ranges, if available: scn::std_ranges aliased to std::ranges
    • Use stdlib Ranges, if available, fall back to custom implementation: namespace alias scn::ranges, control behavior with SCN_USE_STD_RANGES

Additions

  • Add more thorough documentation, tests, benchmarks and examples
  • Add scan_list_until

Fixes and minor stuff