No viable conversion error from boost::spirit::unused_type

两盒软妹~` 提交于 2019-12-25 00:37:56

问题


I'm getting this error: include/boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp:109:35: No viable conversion from 'boost::spirit::unused_type' to 'const std::__1::basic_string'

#define BOOST_SPIRIT_USE_PHOENIX_V3

#define spirit boost::spirit
#define phoenix boost::phoenix

component_ = lit( '-' ) >> string_[ phoenix::bind( &SemanticActionsType::new_component_name, &actions_, spirit::qi::_1 )]

Here is the SemanticActions 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 const & s) const
    {
        cout << "new component name" << endl;
    }

Any ideas? I've tried passing in a pair of iterators (begin, end) as well as the constant string with no success.

来源:https://stackoverflow.com/questions/20864228/no-viable-conversion-error-from-boostspiritunused-type

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!