+ args_raw.push_back(argv[i]);
+
+ i = 0;
+ for(ArgumentList::const_iterator j=args.begin(); j!=args.end(); ++j)
+ {
+ if((*j)->is_list_store())
+ {
+ unsigned end = args_raw.size();
+ for(ArgumentList::const_iterator k=j; ++k!=args.end(); )
+ --end;
+ if(i==end && (*j)->get_type()==REQUIRED_ARG)
+ throw usage_error((*j)->get_name()+" is required");
+ for(; i<end; ++i)
+ (*j)->process(args_raw[i]);
+ }
+ else
+ {
+ if(i<args_raw.size())
+ (*j)->process(args_raw[i++]);
+ else if((*j)->get_type()==REQUIRED_ARG)
+ throw usage_error((*j)->get_name()+" is required");
+ }
+ }
+
+ // XXX Enable this when get_args() is completely removed
+ /*if(i<args_raw.size())
+ throw usage_error("Extra positional arguments");*/