mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 15:14:39 +00:00
Merge pull request #97 from qoelet/qualify-iterator-functions
Qualify iterator functions
This commit is contained in:
commit
165d560b3a
@ -622,8 +622,8 @@ private:
|
|||||||
|
|
||||||
// precondition: we have consumed or will consume at least one digit
|
// precondition: we have consumed or will consume at least one digit
|
||||||
auto consume_digits = [=](std::string_view s) {
|
auto consume_digits = [=](std::string_view s) {
|
||||||
auto it = std::find_if_not(begin(s), end(s), is_digit);
|
auto it = std::find_if_not(std::begin(s), std::end(s), is_digit);
|
||||||
return s.substr(it - begin(s));
|
return s.substr(it - std::begin(s));
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (lookahead(s)) {
|
switch (lookahead(s)) {
|
||||||
@ -779,7 +779,7 @@ private:
|
|||||||
|
|
||||||
T tResult;
|
T tResult;
|
||||||
std::transform(
|
std::transform(
|
||||||
begin(aOperand), end(aOperand), std::back_inserter(tResult),
|
std::begin(aOperand), std::end(aOperand), std::back_inserter(tResult),
|
||||||
[](const auto &value) { return std::any_cast<ValueType>(value); });
|
[](const auto &value) { return std::any_cast<ValueType>(value); });
|
||||||
return tResult;
|
return tResult;
|
||||||
}
|
}
|
||||||
@ -820,10 +820,10 @@ public:
|
|||||||
: mProgramName(other.mProgramName),
|
: mProgramName(other.mProgramName),
|
||||||
mPositionalArguments(other.mPositionalArguments),
|
mPositionalArguments(other.mPositionalArguments),
|
||||||
mOptionalArguments(other.mOptionalArguments) {
|
mOptionalArguments(other.mOptionalArguments) {
|
||||||
for (auto it = begin(mPositionalArguments); it != end(mPositionalArguments);
|
for (auto it = std::begin(mPositionalArguments); it != std::end(mPositionalArguments);
|
||||||
++it)
|
++it)
|
||||||
index_argument(it);
|
index_argument(it);
|
||||||
for (auto it = begin(mOptionalArguments); it != end(mOptionalArguments);
|
for (auto it = std::begin(mOptionalArguments); it != std::end(mOptionalArguments);
|
||||||
++it)
|
++it)
|
||||||
index_argument(it);
|
index_argument(it);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user