adapt to ptree change in boost 1.56 - closes #2365
Conflicts: src/save_map.cpp
This commit is contained in:
parent
144d9a41f0
commit
65bd9e6926
1 changed files with 11 additions and 2 deletions
|
@ -49,6 +49,7 @@
|
|||
// boost
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/property_tree/xml_parser.hpp>
|
||||
|
||||
|
@ -688,7 +689,11 @@ void save_map(Map const& map, std::string const& filename, bool explicit_default
|
|||
{
|
||||
ptree pt;
|
||||
serialize_map(pt,map,explicit_defaults);
|
||||
write_xml(filename,pt,std::locale(),boost::property_tree::xml_writer_make_settings(' ', 2));
|
||||
#if BOOST_VERSION >= 105600
|
||||
write_xml(filename,pt,std::locale(),boost::property_tree::xml_writer_make_settings<ptree::key_type>(' ',2));
|
||||
#else
|
||||
write_xml(filename,pt,std::locale(),boost::property_tree::xml_writer_make_settings(' ',2));
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string save_map_to_string(Map const& map, bool explicit_defaults)
|
||||
|
@ -696,7 +701,11 @@ std::string save_map_to_string(Map const& map, bool explicit_defaults)
|
|||
ptree pt;
|
||||
serialize_map(pt,map,explicit_defaults);
|
||||
std::ostringstream ss;
|
||||
write_xml(ss,pt,boost::property_tree::xml_writer_make_settings(' ', 2));
|
||||
#if BOOST_VERSION >= 105600
|
||||
write_xml(ss,pt,boost::property_tree::xml_writer_make_settings<ptree::key_type>(' ',2));
|
||||
#else
|
||||
write_xml(ss,pt,boost::property_tree::xml_writer_make_settings(' ',2));
|
||||
#endif
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue