|
Boost Users : |
From: Merrill Cornish (merrill.cornish_at_[hidden])
Date: 2005-11-06 21:32:46
Given this program fragment (based on the Getting Started example) using Boost::program_options compiled with MinGW:
options_description desc("Program options");
...
variables_map vm;
store(parse_command_line(argc, argv, desc), vm);
gave the following error (reformatted for readability):
error: no matching function for call to
`store(boost::program_options::basic_parsed_options<const char>,
boost::program_options::variables_map&)'
candidates are:
store(const boost::program_options::basic_parsed_options<char>&,
boost::program_options::variables_map&, bool)
store(const boost::program_options::basic_parsed_options<wchar_t>&,
boost::program_options::variables_map&)
I can add a "true" as a third argument to store(), but the mismatch still remains in the first argument: <const char> versus <char>&.
If I assigned the result of parse_command_line() to an intermediate variable, I can match the &, but the const char versus char still remains.
What is the problem way of calling store()?
Merrill
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net