
Also I don't understand how to restrict hidden values. For example I want command "myutil --help restrict this" to throw exeption but it doesn't do it now. The code I have: po :: options_description optionsDescription ("Allowed options"); optionsDescription.add_options () ("help,h", "produce help message.") ("something-else", po :: value <std :: string> (), "something else."); po :: variables_map options; try { po :: store (po :: parse_command_line (argc, argv, optionsDescription), options); } catch (po :: unknown_option x) { std :: cout << x.what () << std :: endl; return return_user_fault; } po :: notify (options); if (options.count ("help")) { std :: cout << optionsDescription << std :: endl; return ioc_util_return_success; }