Opened 12 years ago

Closed 12 years ago

#4437 closed Feature Requests (wontfix)

Comment character in Configuration file parser incompatible with property_tree and Windows INI Files

Reported by: usa@… Owned by: Vladimir Prus
Milestone: Boost 1.44.0 Component: program_options
Version: Boost 1.43.0 Severity: Problem
Keywords: Cc:

Description

Hello!
As documented the comment character used when parsing configuration files with parse_config_file is '#'.
This is incompatible with Boost.PropertyTree and with Windows ini Files. Both use ';' as the comment character.
See boost/property_tree/ini_parser.hpp and http://msdn.microsoft.com/en-us/library/ms724348%28VS.85%29.aspx .
It would be nice to add an new option to parse_config_file which adds the commentcharacter to use. It can default to '#' which prevents existing code from breaking but allows to use windows inifiles by specifying ';'.

Best regards
Sönke Schau

Change History (1)

comment:1 by Vladimir Prus, 12 years ago

Resolution: wontfix
Status: newclosed

Regretfully, I don't have the time to implement more flexible config file parser. I also don't care much about compatibility with PropertyTree (especially given that it was added after ProgramOptions). So, while I would accept patches that make config file parsing more flexibile, this is not a feature request I'm gonna fix. Sorry!

Note: See TracTickets for help on using tickets.