Boost logo

Boost Users :

Subject: Re: [Boost-users] boost-spirit: need help with simple parser
From: Igor R (boost.lists_at_[hidden])
Date: 2012-07-03 07:10:59


> or even simpler:
> boost::tuple<uint8_t, uint8_t, uint8_t, uint8_t> v;
> bool r = qi::parse(s.begin(), s.end(), octet >> '.' >> octet >> '.'
>>> octet >> '.' >> octet, v);
>
> while the following works correctly:
> boost::fusion::vector<uint8_t, uint8_t, uint8_t, uint8_t> v;
> bool r = qi::parse(s.begin(), s.end(), octet >> '.' >> octet >> '.'
>>> octet >> '.' >> octet, v);
>
> So, the attribute gets converted to boost::tuple is some strange way...

Well, finally got it.
You have to #include <boost/fusion/include/boost_tuple.hpp> to get
boost::tuple adapted correctly.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net