我有以下的語法:問題提振精神已經過時
#include <boost/spirit.hpp>
struct point_grammar
: public boost::spirit::grammar<point_grammar>
{
template <typename Scanner>
struct definition
{
boost::spirit::rule<Scanner> E, S, V;
definition(const point_grammar &self)
{
using namespace boost::spirit;
E = S >> V;
S = '@' >> +(~ch_p('@') - V);
V = str_p("[email protected]") | str_p("[email protected]");
}
const boost::spirit::rule<Scanner> &start()
{
return E;
}
};
};
當我編譯,編譯器告訴我下面的警告:
/usr/include/boost/spirit.hpp:18:4: warning: "This header is deprecated. Please use: boost/spirit/include/classic.hpp"
但是,當變化中的#include升壓/精神/include/classic.hpp,我有以下錯誤:
(expected template-name before ‘<’ token) in the line where is: : public boost::spirit::grammar.
我能做什麼呢?