This commit is contained in:
Mars 2025-05-09 23:37:04 -04:00
parent 5872ee26a6
commit bbf32bd0f2
5 changed files with 54 additions and 87 deletions

View file

@ -2117,7 +2117,7 @@ namespace argparse {
};
fn consume_digits = [=](StringView sd) -> StringView {
const char* const it = std::ranges::find_if_not(sd, is_digit);
const auto it = std::ranges::find_if_not(sd, is_digit);
return sd.substr(static_cast<usize>(it - std::begin(sd)));
};

View file

@ -1762,13 +1762,9 @@ namespace matchit {
template <typename T>
constexpr fn asDsVia = [](auto... members) { return [members...](auto... pats) { return as<T>(and_(app(members, pats)...)); }; };
constexpr fn within = [](const auto& first, const auto& last) {
constexpr fn in = [](const auto& first, const auto& last) {
return meet([=](auto&& v) { return first <= v && v <= last; });
};
constexpr fn between = [](const auto& first, const auto& last) {
return meet([=](auto&& v) { return first < v && v < last; });
};
} // namespace impl
using impl::_;
@ -1780,6 +1776,7 @@ namespace matchit {
using impl::dsVia;
using impl::expr;
using impl::Id;
using impl::in;
using impl::is;
using impl::match;
using impl::matched;
@ -1792,6 +1789,5 @@ namespace matchit {
using impl::Subrange;
using impl::SubrangeT;
using impl::when;
using impl::within;
} // namespace matchit
// NOLINTEND(readability-identifier-*, cppcoreguidelines-special-member-functions)