[property_tree] Failure with Boost 1.56
Dear all, with the release of Boost 1.56, on Ubuntu 14.04 (g++ 4.8.2, 64 bit), code like the following suddenly fails to compile: pt::xml_writer_settings<char> settings('\t', 1); pt::write_xml(someFileName, ptr_out, std::locale(), settings); "pt" is obviously an alias for boost::property_tree. The error message I'm getting is /opt/boost156/include/boost/property_tree/detail/xml_parser_writer_settings.hpp:38:35: error: 'char' is not a class, struct, or union type typedef typename Str::value_type Ch; I can see the following possibly relevant change in property_tree: In Boost 1.55, from xml_parser.hpp: ----------------------------------- template<typename Ptree> void write_xml( const std::string & , const Ptree & , const std::locale & = std::locale() , const xml_writer_settings<typename Ptree::key_type::value_type >& = xml_writer_settings<typename Ptree::key_type::value_type >() ); In Boost 1.56, same header: --------------------------- template<typename Ptree> void write_xml( const std::string & , const Ptree & , const std::locale & = std::locale() , const xml_writer_settings<typename Ptree::key_type > & = xml_writer_settings<typename Ptree::key_type >() ); So xml_writer_settings is now given a Ptree::key_type instead of a Ptree::key_type::value_type which I assume is the reason for the above error. Is there a portable way to specify the type of indention character in write_xml ? Best Regards, Beet
I meet the same problem, could anybody help to provide a suggested way for migrating this to Boost 1.56 ? -- View this message in context: http://boost.2283326.n4.nabble.com/property-tree-Failure-with-Boost-1-56-tp4... Sent from the Boost - Users mailing list archive at Nabble.com.
participants (2)
-
beet
-
Heaven Liang