
How does one do a push_back with push_back_a when one is using closures where the first member is a vector<any>? Similar knowledge is needed when member1 is a map<string, any>! I get the following error: 1>c:\program files\boost\boost_1_34_0\boost\spirit\actor\push_back_actor.hpp(48) : error C2039: 'push_back' : is not a member of 'phoenix::actor<BaseT>' 1> with 1> [ 1> BaseT=phoenix::closure_member<0,phoenix::closure<std::vector<boost::any>,pho enix::nil_t,phoenix::nil_t>> 1> ] When I have the following code ... struct any_s_closure : boost::spirit::closure<any_s_closure, vector<any> > { member1 values; }; ... p_array = '[' >> !(p_value[push_back_a(p_array.values)] % ',') >> ']'; ... typedef rule<ScannerT, double_closure::context_t> rule_d; rule_d p_number;

Jarrad Waterloo wrote:
How does one do a push_back with push_back_a when one is using closures where the first member is a vector<any>? Similar knowledge is needed when member1 is a map<string, any>! I get the following error:
Don't use the *_a actions; they pre-date phoenix. Use the stl wrappers for phoenix instead. You can get them here: http://spirit.sourceforge.net/dl_more/stl-phx.zip Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net

This is a small taste of what I get when I use these headers with VC8 and boost 1.34. Please advise! Is there any hope when working these headers will be made part of Spirit/Boost and the documentation updated to reflect how to get it to work? 1>c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\functions.hpp(134) : error C2977: 'phoenix::impl::make_composite' : too many template arguments 1> c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\composite.hpp(1337) : see declaration of 'phoenix::impl::make_composite' 1> c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\functions.hpp(287) : see reference to class template instantiation 'phoenix::function<OperationT>' being compiled 1>c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\functions.hpp(140) : error C2977: 'phoenix::impl::make_composite' : too many template arguments 1> c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\composite.hpp(1337) : see declaration of 'phoenix::impl::make_composite' 1>c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\functions.hpp(151) : error C2977: 'phoenix::impl::make_composite' : too many template arguments 1> c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\composite.hpp(1337) : see declaration of 'phoenix::impl::make_composite' 1>c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\functions.hpp(358) : error C2977: 'phoenix::impl::make_composite' : too many template arguments 1> c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\composite.hpp(1337) : see declaration of 'phoenix::impl::make_composite' 1>c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\functions.hpp(383) : error C2977: 'phoenix::impl::make_composite' : too many template arguments 1> c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\composite.hpp(1337) : see declaration of 'phoenix::impl::make_composite' 1>c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\functions.hpp(410) : error C2977: 'phoenix::impl::make_composite' : too many template arguments 1> c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\composite.hpp(1337) : see declaration of 'phoenix::impl::make_composite' 1>c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\functions.hpp(134) : error C2977: 'phoenix::impl::make_composite' : too many template arguments 1> c:\program files\boost\boost_1_34_0\boost\spirit\phoenix\composite.hpp(1337) : see declaration of 'phoenix::impl::make_composite' 1> d:\documents and settings\jwaterloo\my documents\visual studio 2005\projects\json_parser\json_parser\stl_containers.hpp(935) : see reference to class template instantiation 'phoenix::function<OperationT>' being compiled 1> with 1> [ 1> OperationT=phoenix::stl::assign 1> ] -----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Joel de Guzman Sent: Tuesday, July 10, 2007 7:51 PM To: boost@lists.boost.org Subject: Re: [boost] Spirit Question Jarrad Waterloo wrote:
How does one do a push_back with push_back_a when one is using closures where the first member is a vector<any>? Similar knowledge is needed when member1 is a map<string, any>! I get the following error:
Don't use the *_a actions; they pre-date phoenix. Use the stl wrappers for phoenix instead. You can get them here: http://spirit.sourceforge.net/dl_more/stl-phx.zip Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
Jarrad Waterloo
-
Joel de Guzman