- 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