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-20 18:14:11


#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 Leonid Gershanovich <gleonid@…>):

 please consider previous attachments.
 essentially I propose to use enums instead of const int:

 {{{

 -- const int f_tws = parse_normalize_whitespace
 -- | parse_trim_whitespace;
 + enum { f_tws = parse_normalize_whitespace
 + | parse_trim_whitespace };

 }}}

 This should work with any compiler as '''enum''' is a compile time
 constant, while '''const int''' is a run time constant.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4146#comment:4>
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