#include <boost/property_tree/xml_parser.hpp>
#include <iostream>
using boost::property_tree::ptree;
int main() {
ptree pt;
pt.push_back(ptree::value_type("pi", ptree("3.14159")));
ptree::const_iterator it = pt.find("pi");
}
C:\Users\tsch\source\repos\ConsoleApplication2\ConsoleApplication2.cpp(10,45): error C2440: "Initialisierung": "boost::property_tree::basic_ptree<std::string,std::string,std::less>::assoc_iterator" kann nicht in "boost::property_tree::basic_ptree<std::string,std::string,std::less>::const_iterator" konvertiert werden
1> with
1> [
1> Key=std::string
1> ]
of course, it works with 'assoc_iterator', but if this is intended, the documentation needs a change.
Hi,
the simple example found here, https://www.boost.org/doc/libs/1_78_0/doc/html/property_tree/accessing.html gives the error below on the full code:
C:\Users\tsch\source\repos\ConsoleApplication2\ConsoleApplication2.cpp(10,45): error C2440: "Initialisierung": "boost::property_tree::basic_ptree<std::string,std::string,std::less>::assoc_iterator" kann nicht in "boost::property_tree::basic_ptree<std::string,std::string,std::less>::const_iterator" konvertiert werden
1> with
1> [
1> Key=std::string
1> ]
of course, it works with 'assoc_iterator', but if this is intended, the documentation needs a change.
Thomas