Re: how to get all the attributes out of a parser
Juan Dent <[email protected]> Fri, 23 Oct 2020 00:10:34 +0000
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <PH0PR10MB45826B9F23B060FE6A6D3AB79B1A0@PH0PR10MB4582.namprd10.prod.outlook.com> |
Hi Joel! Got it! But where is a list of required includes for enabling boost::tuple? I tried including these to no avail: #include <boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp> #include <boost/fusion/adapted/boost_tuple.hpp> #include <boost/fusion/adapted/std_tuple.hpp> #include <boost/fusion/include/adapter.hpp> #include <boost/fusion/functional/adapter.hpp> Regards, Juan Dent -----Original Message----- From: Joel de Guzman <[email protected]> Sent: Thursday, October 22, 2020 5:53 PM To: [email protected] Subject: Re: [Spirit-general] how to get all the attributes out of a parser On 10/23/20 2:40 am, Juan Dent wrote: > Thanks Larry.... I found the culprit. The documentation talks about attributes for parsers being tuples, I was trying to use boost::tuple to collect the synthesized attributes when what I needed was fusion::vector instead! > > The documentation is at fault here. > > Thank you for your help and also of course to Joel! Juan, you *can* use boost tuple of course. Just make sure it is properly adapted, by including the necessary fusion adapter includes. P.S. I don't think the documentation is at fault. I think you missed this part: https://bit.ly/3ohpIQN where it's clearly stated: "The notation tuple<A, B> is used as a placeholder expression for any fusion sequence holding the types A and B, such as boost::fusion::tuple<A, B> or std::pair<A, B> (for more information see Boost.Fusion)." Regards, -- Joel _______________________________________________ Spirit-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spirit-general