Opened 15 years ago

Closed 13 years ago

#1604 closed Bugs (fixed)

property_tree xml parser doesn't compile with gcc

Reported by: tim@… Owned by: kaalus
Milestone: Boost 1.36.0 Component: property_tree
Version: Severity: Problem
Keywords: Cc:

Description

the property_tree xml parser doesn't seem to compile on gcc ... neither on gcc-4.1, 4.2 or 4.3 ... i was using the latest svn checkout ...

tim@laptop:~/workspace/boost/libs/property_tree/examples$ g++-4.2 -c -I../../.. debug_settings.cpp 
In file included from ../../../boost/property_tree/xml_parser.hpp:29,
                 from debug_settings.cpp:12:
../../../boost/property_tree/detail/xml_parser_read_rapidxml.hpp: In function ‘void boost::property_tree::xml_parser::read_xml_internal(std::basic_istream<typename Ptree::key_type::value_type, std::char_traits<typename Ptree::key_type::value_type> >&, Ptree&, int, const std::string&)’:
../../../boost/property_tree/detail/xml_parser_read_rapidxml.hpp:100: error: expected primary-expression before ‘;’ token
../../../boost/property_tree/detail/xml_parser_read_rapidxml.hpp: In function ‘void boost::property_tree::xml_parser::read_xml_internal(std::basic_istream<typename Ptree::key_type::value_type, std::char_traits<typename Ptree::key_type::value_type> >&, Ptree&, int, const std::string&) [with Ptree = boost::property_tree::basic_ptree<std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::property_tree::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::property_tree::translator>]’:
../../../boost/property_tree/xml_parser.hpp:60:   instantiated from ‘void boost::property_tree::xml_parser::read_xml(const std::string&, Ptree&, int, const std::locale&) [with Ptree = boost::property_tree::ptree]’
debug_settings.cpp:39:   instantiated from here
../../../boost/property_tree/detail/xml_parser_read_rapidxml.hpp:100: error: address of overloaded function with no contextual type information

Attachments (1)

xml_parser_read_rapidxml.hpp.patch (358 bytes ) - added by oliver.kowalke@… 15 years ago.
patch for xml_parser_read_rapidxml.hpp

Download all attachments as: .zip

Change History (4)

comment:1 by Marshall Clow, 15 years ago

Component: Noneproperty_tree
Owner: set to kaalus

by oliver.kowalke@…, 15 years ago

patch for xml_parser_read_rapidxml.hpp

in reply to:  1 comment:2 by Oliver, 15 years ago

Replying to marshall: Hi, I've added an patch. It adds the template keyword to the member function parse of xml_document<>. Now it compiles with gcc-4.2. Probably the same modification is required on other code pieces - I don't know. so long, Oliver

comment:3 by Sebastian Redl, 13 years ago

Resolution: fixed
Status: newclosed

Fixed already.

Note: See TracTickets for help on using tickets.