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: http://boost-spirit.com/home/articles
/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?
Code:
#include<boost/spirit/include/karma.hpp>
#include<boost/spirit/include/karma_format_attr.hpp>
#include<list>
#include<iostream>
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: <https://svn.boost.org/trac/boost/ticket/6948#comment:3> 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:09 UTC