Re: [Boost-bugs] [Boost C++ Libraries] #6948: Boost::spirit::karma generator bug

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6948: Boost::spirit::karma generator bug
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-05-28 14:45:25

#6948: Boost::spirit::karma generator bug
  Reporter: yaoyuan1216@… | Owner: hkaiser
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: spirit
   Version: Boost 1.49.0 | Severity: Problem
Resolution: invalid | Keywords:

Comment (by anonymous):

 Replying to [comment:2 hkaiser]:
> Use BOOST_AUTO instead (see here:
 /qi-example/zero-to-60-mph-in-2-seconds/). The article explains the
 rationale as well.

 Excuse me! I've changed 'auto' to 'BOOST_AUTO', but it doesn't work! I got
 the same error as before. In addition, I used gcc4.6.3 which supports
 'auto' keyword. Would you have any idea?


 BOOST_AUTO(par, '{' << -(boost::spirit::karma::int_ % ',') <<
 '}');//Define par here would lead to error!
 int main(){
         using namespace std;
         namespace karma = boost::spirit::karma;
         list<int> l{1, 2, 4};
         //BOOST_AUTO(par, '{' << -(boost::spirit::karma::int_ % ',') <<
 '}');//Whils this would not!
         cout<<karma::format(par, l)<<endl;
         return 0;

Ticket URL: <>
Boost C++ Libraries <>
Boost provides free peer-reviewed portable C++ source libraries.

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