Opened 12 years ago
Closed 11 years ago
#5379 closed Feature Requests (fixed)
Support '#' comments in property_tree ini parser
Reported by: | Owned by: | Sebastian Redl | |
---|---|---|---|
Milestone: | To Be Determined | Component: | property_tree |
Version: | Boost 1.45.0 | Severity: | Not Applicable |
Keywords: | Cc: |
Description
The INI parser currently supports only the semi-colon symbol as comment marker.
The wikipedia article on INI files, http://en.wikipedia.org/wiki/INI_file#Varying_features notes:
Some software supports the use of the number sign (#) as an alternative to the semicolon for indicating comments.
The feature would be useful to me, since I'm using a number of existing files that use '#' as a comment marker. Also, this would make the ini parser compatible with java properties files.
I'm attaching a patch that enables the use of # for comments. A more elaborate implementation could make the feature optional, as to avoid breaking ini files with properties starting with #.
Attachments (1)
Change History (3)
by , 12 years ago
Attachment: | boost_1.45_libpropertytree.patch added |
---|
comment:1 by , 12 years ago
As it happens, I had the very same need a few days ago and implemented this, so it's available on trunk.
Patch to support # as comment marker in ini parser