From: Leandro L. <lu...@ll...> - 2010-09-03 22:08:31
|
Leandro Lucarella, el 3 de septiembre a las 16:28 me escribiste: > struct data > { > unsigned int num; > std::string str; > }; > > struct data_closure: classic::closure<data_closure, data> > { > member1 d; > }; > > struct the_grammar: grammar<the_grammar, data_closure::context_t> > { > template <typename ScannerT> > struct definition > { > definition(the_grammar const& self) > { > the_rule = > uint_p[bind(&data::num)(the_rule.d) = arg1] > >> (+anychar_p)[bind(&data::str)(the_rule.d) = > construct_<std::string>(arg1, arg2)]; > } > typedef rule<ScannerT, data_closure::context_t> rule_t; > rule_t the_rule; > rule_t const& start() const { return the_rule; } > }; > }; I forgot to mention that removing the member data::num and the corresponding part of the rule; or removing data::str (and the corresponding part of the rule) compiles without errors. -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- CARANCHO OBNUBILADO APARECE EN PARQUE CHACABUCO! -- Crónica TV |