Program Options: Documentation about response files out of date?
Hi, [1] says:
The library does not provide direct support for response files, so you'll need to write some extra code.
But this code does the trick without much extra code: std::ifstream is(vm["conf_file"].asstd::string().c_str()); po::store(po::parse_config_file(is, desc), vm); Or is a response file something else? In that case, maybe that should be mentioned, as I think for lots of users this is enough. [1] http://boost.org/doc/html/program_options/howto.html#id1592676
Olaf van der Spek wrote:
Hi,
[1] says:
The library does not provide direct support for response files, so you'll need to write some extra code.
But this code does the trick without much extra code: std::ifstream is(vm["conf_file"].asstd::string().c_str()); po::store(po::parse_config_file(is, desc), vm);
Or is a response file something else? In that case, maybe that should be mentioned, as I think for lots of users this is enough.
Quoting the docs: A response file is just a configuration file which uses the same syntax as the command line So, response file might contain: --foo=bar while regular config file has different syntax. Also, it is typical to use response files with the @filename syntax, which is also not readily available. - Volodya
On 7/20/07, Vladimir Prus
Olaf van der Spek wrote:
Or is a response file something else? In that case, maybe that should be mentioned, as I think for lots of users this is enough.
Quoting the docs:
A response file is just a configuration file which uses the same syntax as the command line
So, response file might contain:
--foo=bar
while regular config file has different syntax. Also, it is typical to use response files with the @filename syntax, which is also not readily available.
Ah. So: "In that case, maybe that should be mentioned, as I think for lots of users this is enough."
participants (2)
-
Olaf van der Spek
-
Vladimir Prus