코드 1.53 multi_pass 반복자 관련 컴파일 오류 :부스트 :: 정신
typedef std::string::const_iterator iterator;
namespace parsers
{
namespace spirit = ::boost::spirit;
namespace ascii = ::boost::spirit::ascii;
namespace phoenix = ::boost::phoenix;
spirit::qi::rule< iterator, void(std::string), ascii::space_type > action_parser =
'"'
> spirit::qi::lit("action")
> spirit::qi::labels::_r1
> '"';
}
오류 :
> 1>CL : warning : This header is deprecated. Please use:
> boost/spirit/include/classic.hpp
> 1>D:\CPP\boost\boost_1_53_0\boost_1_53_0\boost/spirit/home/support/iterators/multi_pass_fwd.hpp(59):
> error C2976: 'boost::spirit::multi_pass' : too few template arguments
> 1>D:\CPP\boost\boost_1_53_0\boost_1_53_0\boost/spirit/home/support/iterators/multi_pass_fwd.hpp(86):
> error C3203: 'multi_pass' : unspecialized class template can't be used
> as a template argument for template parameter 'Iterator', expected a
> real type
> 1>D:\CPP\boost\boost_1_53_0\boost_1_53_0\boost/spirit/home/support/iterators/multi_pass_fwd.hpp(86):
> error C2955: 'boost::spirit::multi_pass' : use of class template
> requires template argument list
> 1>D:\CPP\boost\boost_1_53_0\boost_1_53_0\boost/spirit/home/support/iterators/multi_pass_fwd.hpp(86):
> error C2977: 'boost::spirit::traits::is_multi_pass' : too many
> template arguments
> 1>D:\CPP\boost\boost_1_53_0\boost_1_53_0\boost/spirit/home/support/iterators/multi_pass.hpp(183):
> error C2976: 'boost::spirit::multi_pass' : too few template arguments
> 1>D:\CPP\boost\boost_1_53_0\boost_1_53_0\boost/spirit/home/support/iterators/istream_iterator.hpp(37):
> error C2955: 'boost::spirit::multi_pass' : use of class template
> requires template argument list
적절한 경우 템플릿 인수의 개수가 적절하고 오류가 발생하는 이유를 이해하지 못한다고 생각하십니까? – ChiefTwoPencils
[C2976] (http://msdn.microsoft.com/en-us/library/1t1kaz6a.aspx), [C3203] (http://msdn.microsoft.com/en-us/library/606k9xxc (v = vs.80) .aspx),보다 일반적으로 [Build Errors] (http://msdn.microsoft.com/en-us/library/8x5x43k7 (v = vs80) .aspx)가 도움이 될 것입니다. – ChiefTwoPencils
공식적인 예가 있습니다 : http://www.boost.org/doc/libs/1_53_0/libs/spirit/doc/html/spirit/qi/tutorials/mini_xml___asts_.html. 예, 규칙에 제공된 템플리트 인수는 예제에 따라 정확합니다. – John