I have part of a grammar as follows:
typedef SemanticActions< IterType > SemanticActionsType;
string_ %= lexeme[ +( spirit::qi::alnum | punct )];
component_ = lit( '-' ) >> string_[boost::bind( &SemanticActionsType::new_component_name, &actions_, _1, _2 )]
And the corresponding semantic actions class:
template< typename IterType >
class SemanticActions
{
public:
SemanticActions( Design_p d ) : design_( d )
{
}
void print(int const& i) const
{
std::cout << i << std::endl;
}
void new_component_name ( std::string::iterator const b, std::string::iterator const e) const
{
cout << "new component name" << endl;
}
I can get the "print" function to call from an int_ token, but I can't get new_component_name to get called from the string_ token.
I'm getting the following error: boost/include/boost/bind/bind.hpp:397:9: No matching function for call to object of type 'const boost::_mfi::cmf2 >, std::__1::__wrap_iter, std::__1::__wrap_iter >'
I've tried both the iterator pair parameters as well as "std::string & s const" parameter.