
HI, I am using boost 1.33.0 with g++ 3.4.2 on Sun. The error is: terminate called after throwing an instance of 'boost::program_options::multiple_occurrences' what(): multiple_occurrences Abort (core dumped) For the following code: namespace po = boost::program_options; namespace fs = boost::filesystem; po::options_description generic("Allowed options"); generic.add_options() ("help", "produce help message") ; po::options_description hidden("Hidden options"); hidden.add_options() ("input-file", po::value< std::vector<fs::path> >(), "input file") ; po::options_description cmdline_options; cmdline_options.add(generic).add(hidden); po::positional_options_description p; p.add("input-file", -1); po::variables_map vm; po::store(po::command_line_parser(argc, argv). options(cmdline_options).positional(p).run(), vm); po::notify(vm); if (vm.count("help")) { std::cout << generic << " input1 [input2 ...]\n" << std::endl; return 1; } std::vector<fs::path> inputFilenames; if(vm.count("input-file")) { inputFilenames = vm["input-file"].as<std::vector<fs::path> >(); } Thanks, Chris On 1/12/06, Beman Dawes <bdawes@acm.org> wrote:
"Chris Weed" <chrisweed@gmail.com> wrote in message news:359e4bf50601110848w64205e7bt812579c77be3e983@mail.gmail.com...
Hi,
I made a custom validator for filesystem::path and that works, but I can't seem to get the same to work for std::vector<filesystem::path>.
I keep getting an exception about multiple_occurrences when I use it.
What version of Boost?
What compiler and compiler version?
What is the exact error message you are getting?
--Beman
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost