@@ -54,6 +54,9 @@ namespace docopt {
5454
5555 // Arguments contained '--version' and parsing was aborted early
5656 struct DocoptExitVersion : std::runtime_error { DocoptExitVersion() : std::runtime_error(" Docopt --version argument encountered" ) {} };
57+
58+ // / A map of options set by the user
59+ using options = std::map<std::string, value>;
5760
5861 // / Parse user options from the given option string.
5962 // /
@@ -68,7 +71,7 @@ namespace docopt {
6871 // / @throws DocoptExitHelp if 'help' is true and the user has passed the '--help' argument
6972 // / @throws DocoptExitVersion if 'version' is true and the user has passed the '--version' argument
7073 // / @throws DocoptArgumentError if the user's argv did not match the usage patterns
71- std::map<std::string, value> DOCOPT_API docopt_parse (std::string const & doc,
74+ options DOCOPT_API docopt_parse (std::string const & doc,
7275 std::vector<std::string> const & argv,
7376 bool help = true ,
7477 bool version = true ,
@@ -81,7 +84,7 @@ namespace docopt {
8184 // / * DocoptExitHelp - print usage string and terminate (with exit code 0)
8285 // / * DocoptExitVersion - print version and terminate (with exit code 0)
8386 // / * DocoptArgumentError - print error and usage string and terminate (with exit code -1)
84- std::map<std::string, value> DOCOPT_API docopt (std::string const & doc,
87+ options DOCOPT_API docopt (std::string const & doc,
8588 std::vector<std::string> const & argv,
8689 bool help = true ,
8790 std::string const & version = {},
0 commit comments