Re: [Boost-bugs] [Boost C++ Libraries] #6444: qi::lit(<char>) parses into a '\0' in 1.47 and 1.48

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6444: qi::lit(<char>) parses into a '\0' in 1.47 and 1.48
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-01-25 00:36:15


#6444: qi::lit(<char>) parses into a '\0' in 1.47 and 1.48
---------------------------------+------------------------------------------
  Reporter: mathstuf@… | Owner: djowel
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: spirit
   Version: Boost 1.48.0 | Severity: Regression
Resolution: wontfix | Keywords:
---------------------------------+------------------------------------------
Changes (by djowel):

  * status: new => closed
  * resolution: => wontfix

Comment:

 Use char_ instead (as you hinted):

   tok %=
     +( qi::alnum
      | qi::char_('-')
      | qi::char_('_')
      );

 lit has an "unused" attribute ( http://tinyurl.com/6lu2stx ) while char
 gives you the character type of the enclosing character encoding namespace
 (e.g. ascii, unicode, etc.). The way "unused" attribute is synthesized is
 undefined.

 The behavior you see is an upshot of the optimizations and refinement we
 did for 1.47 and higher. As such, for alternatives, we only synthesize the
 advertized attribute in cases like this where the client passed in a non-
 variant (std::string).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6444#comment:1>
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:08 UTC