Re: [Boost-bugs] [Boost C++ Libraries] #4146: [patch] ./boost/property_tree/detail/xml_parser_read_rapidxml.hpp:117: error: non-constant `(((int)f_c) | 3072)' cannot be used as template argument

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4146: [patch] ./boost/property_tree/detail/xml_parser_read_rapidxml.hpp:117: error: non-constant `(((int)f_c) | 3072)' cannot be used as template argument
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-22 09:23:12


#4146: [patch] ./boost/property_tree/detail/xml_parser_read_rapidxml.hpp:117:
error: non-constant `(((int)f_c) | 3072)' cannot be used as template
argument
---------------------------------------------------+------------------------
  Reporter: Jan-Hein Bührman <buhrman@…> | Owner: cornedbee
      Type: Bugs | Status: closed
 Milestone: | Component: property_tree
   Version: Boost Development Trunk | Severity: Showstopper
Resolution: fixed | Keywords: property_tree xml_parser non-constant template argument
---------------------------------------------------+------------------------

Comment (by cornedbee):

 buhrman is completely right. These const ints are compile-time constants,
 and any compiler that doesn't treat them as such is broken.

 That said, my only objection to your patch is that I find enums to define
 non-enumerated constants to be extremely ugly, and local enums even more
 so. That said, I'll see about applying your patch.

 It's strange, though. According to the trunk test matrix, gcc-3.4.6 works
 just fine (the Sandia gcc-3.4.6 tester is all green). Furthermore, 4.0.1,
 4.2.1, 4.2.4, 4.3.4, 4.4.3, 4.4.4, 4.4.5, 4.5.1 and 4.5.2 all work fine.
 The release branch XML test also passes for every single GCC version
 tested.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4146#comment:11>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC