Spirit X3 employee.cpp compile error
Vincent Virgilio <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
Visual Studio 2015 Professional Boost 1.61, Windows binary install Spirit X3 example 'employee.cpp' (http://ciere.com/example/x3/employee.cpp) Unless I add a third template argument of 'true' to the declaration of the employee rule, compilation fails with the below message. It's tripping on an ambiguous overload. Vince 1>------ Build started: Project: employee, Configuration: Release Win32 ------ 1> employee.cpp 1>C:\local\boost_1_61_0\boost/spirit/home/x3/nonterminal/rule.hpp(116): error C2668: 'client::parser::parse_rule': ambiguous call to overloaded function 1> ..\..\x3\example\employee.cpp(86): note: could be 'bool client::parser::parse_rule<Iterator,Context,Attribute_>(const boost::spirit::x3::rule<client::parser::employee,client::ast::employee,false>,Iterator &,const Iterator &,const Context &,Attribute &)' [found using argument-dependent lookup] 1> with 1> [ 1> Iterator=std::_String_const_iterator<std::_String_val<std::_Simple_types<char>>>, 1> Context=boost::spirit::x3::context<boost::spirit::x3::skipper_tag,const boost::spirit::x3::ascii::space_type,boost::spirit::x3::unused_type>, 1> Attribute_=client::ast::employee, 1> Attribute=client::ast::employee 1> ] 1> C:\local\boost_1_61_0\boost/spirit/home/x3/nonterminal/rule.hpp(30): note: or 'boost::spirit::x3::detail::default_parse_rule_result boost::spirit::x3::parse_rule<client::parser::employee,client::ast::employee,Iterator,Context,Attribute_>(boost::spirit::x3::rule<client::parser::employee,client::ast::employee,false>,Iterator &,const Iterator &,const Context &,ActualAttribute &)' 1> with 1> [ 1> Iterator=std::_String_const_iterator<std::_String_val<std::_Simple_types<char>>>, 1> Context=boost::spirit::x3::context<boost::spirit::x3::skipper_tag,const boost::spirit::x3::ascii::space_type,boost::spirit::x3::unused_type>, 1> Attribute_=client::ast::employee, 1> ActualAttribute=client::ast::employee 1> ] 1> C:\local\boost_1_61_0\boost/spirit/home/x3/nonterminal/rule.hpp(116): note: while trying to match the argument list '(const boost::spirit::x3::rule<client::parser::employee,client::ast::employee,false>, std::_String_const_iterator<std::_String_val<std::_Simple_types<char>>>, const std::_String_const_iterator<std::_String_val<std::_Simple_types<char>>>, const boost::spirit::x3::context<boost::spirit::x3::skipper_tag,const Derived,boost::spirit::x3::unused_type>, client::ast::employee)' 1> with 1> [ 1> Derived=boost::spirit::x3::ascii::space_type 1> ] 1> C:\local\boost_1_61_0\boost/spirit/home/x3/core/parse.hpp(117): note: see reference to function template instantiation 'bool boost::spirit::x3::rule<client::parser::employee,client::ast::employee,false>::parse<Iterator,boost::spirit::x3::context<boost::spirit::x3::skipper_tag,const Derived,boost::spirit::x3::unused_type>,Attribute>(Iterator &,const Iterator &,const Context &,boost::spirit::x3::unused_type,Attribute_ &) const' being compiled 1> with 1> [ 1> Iterator=std::_String_const_iterator<std::_String_val<std::_Simple_types<char>>>, 1> Derived=boost::spirit::x3::ascii::space_type, 1> Attribute=client::ast::employee, 1> Context=boost::spirit::x3::context<boost::spirit::x3::skipper_tag,const boost::spirit::x3::ascii::space_type,boost::spirit::x3::unused_type>, 1> Attribute_=client::ast::employee 1> ] 1> C:\local\boost_1_61_0\boost/spirit/home/x3/core/parse.hpp(117): note: see reference to function template instantiation 'bool boost::spirit::x3::rule<client::parser::employee,client::ast::employee,false>::parse<Iterator,boost::spirit::x3::context<boost::spirit::x3::skipper_tag,const Derived,boost::spirit::x3::unused_type>,Attribute>(Iterator &,const Iterator &,const Context &,boost::spirit::x3::unused_type,Attribute_ &) const' being compiled 1> with 1> [ 1> Iterator=std::_String_const_iterator<std::_String_val<std::_Simple_types<char>>>, 1> Derived=boost::spirit::x3::ascii::space_type, 1> Attribute=client::ast::employee, 1> Context=boost::spirit::x3::context<boost::spirit::x3::skipper_tag,const boost::spirit::x3::ascii::space_type,boost::spirit::x3::unused_type>, 1> Attribute_=client::ast::employee 1> ] 1> C:\local\boost_1_61_0\boost/spirit/home/x3/core/parse.hpp(134): note: see reference to function template instantiation 'bool boost::spirit::x3::phrase_parse_main<Iterator,Parser,Skipper,Attribute>(Iterator &,Iterator,const Parser &,const Skipper &,Attribute &,boost::spirit::x3::skip_flag)' being compiled 1> with 1> [ 1> Iterator=std::_String_const_iterator<std::_String_val<std::_Simple_types<char>>>, 1> Parser=boost::spirit::x3::rule<client::parser::employee,client::ast::employee,false>, 1> Skipper=boost::spirit::x3::ascii::space_type, 1> Attribute=client::ast::employee 1> ] 1> ..\..\x3\example\employee.cpp(118): note: see reference to function template instantiation 'bool boost::spirit::x3::phrase_parse<std::_String_const_iterator<std::_String_val<std::_Simple_types<char>>>,boost::spirit::x3::rule<client::parser::employee,client::ast::employee,false>,boost::spirit::x3::ascii::space_type,client::ast::employee>(Iterator &,Iterator,const Parser &,const Skipper &,Attribute &,boost::spirit::x3::skip_flag)' being compiled 1> with 1> [ 1> Iterator=std::_String_const_iterator<std::_String_val<std::_Simple_types<char>>>, 1> Parser=boost::spirit::x3::rule<client::parser::employee,client::ast::employee,false>, 1> Skipper=boost::spirit::x3::ascii::space_type, 1> Attribute=client::ast::employee 1> ] ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev _______________________________________________ Spirit-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spirit-general