diff --git a/cmdopt2/parser.cpp b/cmdopt2/parser.cpp index 0f126abf..d3fbd0f6 100644 --- a/cmdopt2/parser.cpp +++ b/cmdopt2/parser.cpp @@ -207,13 +207,13 @@ parser::parse (int const argc, const char *const *argv) arg_cursor++; } - for (int i = 0, last = std::ssize (m_positional); i < last; ++i) + for (int i = 0, last = int (m_positional.size ()); i < last; ++i) if (m_positional[i].required () and !found_positional[i]) throw std::runtime_error ( fmt::format ("Missing required position argument {}", m_positional[i].name) ); - for (int i = 0, last = std::ssize (m_keyword); i < last; ++i) + for (int i = 0, last = int (m_keyword.size ()); i < last; ++i) if (m_keyword[i].required () and !found_keyword[i]) throw std::runtime_error ( fmt::format ("Missing required named argument {}", m_keyword[i].name)