Opened 6 years ago

#12259 new Patches

improved version of boost::property_tree::ini_parser, which handles comments in INI-files

Reported by: jan.krieger@… Owned by: Sebastian Redl
Milestone: To Be Determined Component: property_tree
Version: Boost Release Branch Severity: Problem
Keywords: boost::property_tree, ini_parser Cc: jan@…

Description

The original implementation of boost::property_tree::ini_parser does ignore comments when reading, therefore they are also deleted when writing back the Contents of a boost::property_tree.

For us this behaviour was not very desirable, as we cannot comment our ini files properly then.

Therefore I implemented an alternative Version of boost::property_tree::ini_parser that reads comments into special entries in the boost::property_tree and then uses these entries when writing an INI file to reconstruct the comments. I think the boost library (and other users) might well Profit from such functions and they can easily be provided alongside the already available functions as an alternative.

I'm attaching my Version of the ini_parser and hope you can incorporate it into the next Releases of boost.

Best, JAN Krieger (Deidelberger Druckmaschinen AG)

Attachments (3)

boost_ini_parser_with_comments.hpp (18.1 KB ) - added by jan@… 6 years ago.
alternative implementation, as described in the ticket
ini_parser.patch (10.5 KB ) - added by anonymous 5 years ago.
ini_parser.diff (10.4 KB ) - added by sab914@… 4 years ago.
refactoring

Download all attachments as: .zip

Change History (3)

by jan@…, 6 years ago

alternative implementation, as described in the ticket

by anonymous, 5 years ago

Attachment: ini_parser.patch added

by sab914@…, 4 years ago

Attachment: ini_parser.diff added

refactoring

Note: See TracTickets for help on using tickets.