Skip to content

v3.9.0

Latest
Compare
Choose a tag to compare
@hanickadot hanickadot released this 16 May 21:02
· 17 commits to main since this release
  • you can now use CTRE as C++ module! with -DCTRE_MODULE=ON (experimental) πŸŽ‰
  • ctre::range is deprecated and replaced with ctre::search_all
void print_all_string(std::string_view subject) {
  for (auto word: ctre::search_all<"\\w+">(subject)) {
    std::cout << word.to_view() << "\n";
  }
}
  • simple ctre::capture_group concept
  • capture groups / result type now has .to_optional_number(...) member function which returns std::nullopt if group is not matching
std::optional<int> parse_number(std::string_view) {
  return ctre::match<"([0-9]+)">(subject).to_optional_number();
}
  • fixed #305 (missing binary_property first-follow checker