```C++ auto commandLine="\"C:\\example.exe\"" try { app.parse(commandLine, true); } catch (const CLI::ParseError& e) { //return app.exit(e); } ``` `split_program_name` will throw `std::out_of_range` exception, if nothing left in command line after removing the program name here: ```C++ vals.second = (esp != std::string::npos) ? commandline.substr(esp + 1) : std::string{}; ``` a quick fix is: ```C++ trim(commandline); auto length = commandline.length(); auto esp = commandline.find_first_of(' ', 1); while(detail::check_path(commandline.substr(0, esp).c_str()) != path_type::file){ ...... // strip the program name vals.second = (esp != std::string::npos) && (esp < length) ? commandline.substr(esp + 1) : std::string{}; ```