Skip to content

Commit

Permalink
Merge pull request #97 from qoelet/qualify-iterator-functions
Browse files Browse the repository at this point in the history
Qualify iterator functions
  • Loading branch information
p-ranav authored Mar 25, 2021
2 parents 9903a22 + c869f20 commit 165d560
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/argparse/argparse.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,8 @@ class Argument {

// precondition: we have consumed or will consume at least one digit
auto consume_digits = [=](std::string_view s) {
auto it = std::find_if_not(begin(s), end(s), is_digit);
return s.substr(it - begin(s));
auto it = std::find_if_not(std::begin(s), std::end(s), is_digit);
return s.substr(it - std::begin(s));
};

switch (lookahead(s)) {
Expand Down Expand Up @@ -779,7 +779,7 @@ class Argument {

T tResult;
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); });
return tResult;
}
Expand Down Expand Up @@ -820,10 +820,10 @@ class ArgumentParser {
: mProgramName(other.mProgramName),
mPositionalArguments(other.mPositionalArguments),
mOptionalArguments(other.mOptionalArguments) {
for (auto it = begin(mPositionalArguments); it != end(mPositionalArguments);
for (auto it = std::begin(mPositionalArguments); it != std::end(mPositionalArguments);
++it)
index_argument(it);
for (auto it = begin(mOptionalArguments); it != end(mOptionalArguments);
for (auto it = std::begin(mOptionalArguments); it != std::end(mOptionalArguments);
++it)
index_argument(it);
}
Expand Down

0 comments on commit 165d560

Please sign in to comment.