@@ -119,7 +119,7 @@ bool LeafPattern::match(PatternList& left, std::vector<std::shared_ptr<LeafPatte
119
119
return false ;
120
120
}
121
121
122
- left.erase (left.begin ()+static_cast <decltype (left. begin ())::difference_type >(match.first ));
122
+ left.erase (left.begin ()+static_cast <ssize_t >(match.first ));
123
123
124
124
auto same_name = std::find_if (collected.begin (), collected.end (), [&](std::shared_ptr<LeafPattern> const & p) {
125
125
return p->name ()==name ();
@@ -170,7 +170,7 @@ Option Option::parse(std::string const& option_description)
170
170
auto double_space = option_description.find (" " );
171
171
auto options_end = option_description.end ();
172
172
if (double_space != std::string::npos) {
173
- options_end = option_description.begin () + static_cast <decltype (option_description. begin ())::difference_type >(double_space);
173
+ options_end = option_description.begin () + static_cast <ssize_t >(double_space);
174
174
}
175
175
176
176
static const std::regex pattern {" (--|-)?(.*?)([,= ]|$)" };
@@ -512,7 +512,7 @@ class Tokens {
512
512
std::string the_rest () const {
513
513
if (!*this )
514
514
return {};
515
- return join (fTokens .begin ()+static_cast <decltype ( fTokens . begin ())::difference_type >(fIndex ),
515
+ return join (fTokens .begin ()+static_cast <ssize_t >(fIndex ),
516
516
fTokens .end (),
517
517
" " );
518
518
}
@@ -920,7 +920,7 @@ static std::vector<Option> parse_defaults(std::string const& doc) {
920
920
std::vector<Option> defaults;
921
921
922
922
for (auto s : parse_section (" options:" , doc)) {
923
- s.erase (s.begin (), s.begin ()+static_cast <decltype (s. begin ())::difference_type >(s.find (' :' ))+1 ); // get rid of "options:"
923
+ s.erase (s.begin (), s.begin ()+static_cast <ssize_t >(s.find (' :' ))+1 ); // get rid of "options:"
924
924
925
925
std::for_each (std::sregex_iterator{ s.begin (), s.end (), pattern },
926
926
std::sregex_iterator{},
0 commit comments