#5281 closed Bugs (fixed)
alloc_func typedef in rapidxml.hpp, VC++ compiler can't lookup
Reported by: | Owned by: | Sebastian Redl | |
---|---|---|---|
Milestone: | To Be Determined | Component: | property_tree |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: |
Description
In VC8~VC10, a compilation error will be occurred when you declare "alloc_func" that can lookup from "boost::property_tree::detail::rapidxml" namespace before including <boost/property_tree/detail/rapidxml.hpp>.
struct alloc_func; #include <boost/property_tree/detail/rapidxml.hpp>
error C2226: syntax error : unexpected type 'alloc_func' A syntax error occurs before or in the type specifier.
Because the VC++ compiler cause unexpectedly lookup about alloc_func typedef in rapidxml.hpp.
Attachments (1)
Change History (8)
by , 12 years ago
Attachment: | rapidxml.patch added |
---|
comment:1 by , 11 years ago
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-up: 7 comment:6 by , 10 years ago
Alternate fix: change all occurrences of alloc_func to alloc_func1.
comment:7 by , 10 years ago
Replying to trent.waddington@…:
Alternate fix: change all occurrences of alloc_func to alloc_func1.
This worked for me in windows. Have not yet tested if the fix works in other OS.
Note:
See TracTickets
for help on using tickets.
FYI, I also encountered this problem. One of the projects I'm involved with uses both <boost/property_tree/xml_parser.hpp> and the toolkit ITK, which includes a file named <zlib.h>. This <zlib.h> has a alloc_func typedef which appears to conflict with the one in xml_parser.hpp. So I would very much appreciate if this issue would be fixed.