Xfer: Difference between revisions

From John's wiki
Jump to navigation Jump to search
(xfer)
(xfer)
Line 1: Line 1:
  g++    -c -g -I.. -I../trunk -std=c++11 -MMD -MP -MF "build/Debug/GNU-Linux-x86/Hub.o.d" -o build/Debug/GNU-Linux-x86/Hub.o Hub.cpp
  boost::property_tree::ptree pt;
Hub.cpp: In member function ‘void Hub::Hub::Start()’:
  boost::property_tree::ptree &ref_pt = pt;
  Hub.cpp:68:67: error: invalid initialization of non-const reference of type ‘boost::property_tree::ptree& {aka boost::property_tree::basic_ptree<std::basic_string<char>, std::basic_string<char> >&}’ from an rvalue of type ‘boost::property_tree::ptree {aka boost::property_tree::basic_ptree<std::basic_string<char>, std::basic_string<char> >}’
std::stringstream stream(message);
      boost::property_tree::ptree &pt = boost::property_tree::ptree();
boost::property_tree::xml_parser::read_xml( stream, ref_pt );
                                                                    ^

Revision as of 11:14, 3 September 2015

boost::property_tree::ptree pt;
boost::property_tree::ptree &ref_pt = pt;
std::stringstream stream(message);
boost::property_tree::xml_parser::read_xml( stream, ref_pt );