boost :: spirit :: unused_type没有可行的转换错误

时间:2013-12-31 23:31:12

标签: c++ boost-spirit boost-spirit-qi

我收到此错误: include / boost / spirit / home / phoenix / bind / detail / member_function_ptr.hpp:109:35:无法从'boost :: spirit :: unused_type'转换为'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 )]

这是SemanticActions类:

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;
    }

有什么想法吗?我试过传递一对迭代器(开始,结束)以及常量字符串但没有成功。

0 个答案:

没有答案
相关问题