我正在尝试使用 read_xml 函数将 xml 文件读入 ptree,如下所示:
read_xml(myFile, myPtree, boost::property_tree::xml_parser::trim_whitespace);
这里 myFile 是一个std::string
,而 myPtree 是一个basic_ptree<std::string, std::wstring>.
构建时它给了我以下错误:
xml_parser_read_rapidxml.hpp(48): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'std::basic_string<_Elem,_Traits,_Alloc>' (or there is no acceptable conversion)
with
[
_Elem=char,
_Traits=std::char_traits<char>,
_Alloc=std::allocator<char>
]
关于可能导致错误的任何指针?