Ticket #4146: xml_parser_read_rapidxml.hpp.patch_1_46_0

File xml_parser_read_rapidxml.hpp.patch_1_46_0, 1.2 KB (added by Leonid Gershanovich <gleonid@…>, 12 years ago)

using enums instead of const int template arguments

Line 
1Found problem that caused compilation errors with gcc 3.4.6:
2
3template instatiated with "runtime const" instead of "compile time const"
4
5--- boost-1.46.0/boost/property_tree/detail/xml_parser_read_rapidxml.hpp.orig 2010-10-15 08:40:04.000000000 -0400
6+++ boost-1.46.0/boost/property_tree/detail/xml_parser_read_rapidxml.hpp 2011-03-07 15:45:58.000000000 -0500
7@@ -103,13 +103,14 @@
8
9 try {
10 // Parse using appropriate flags
11- const int f_tws = parse_normalize_whitespace
12- | parse_trim_whitespace;
13- const int f_c = parse_comment_nodes;
14+ enum { f_tws = parse_normalize_whitespace
15+ | parse_trim_whitespace };
16+
17+ enum { f_c = parse_comment_nodes};
18 // Some compilers don't like the bitwise or in the template arg.
19- const int f_tws_c = parse_normalize_whitespace
20+ enum { f_tws_c = parse_normalize_whitespace
21 | parse_trim_whitespace
22- | parse_comment_nodes;
23+ | parse_comment_nodes };
24 xml_document<Ch> doc;
25 if (flags & no_comments) {
26 if (flags & trim_whitespace)