[Boost-bugs] [Boost C++ Libraries] #1133: compile error for parsing a string on vc2005

Subject: [Boost-bugs] [Boost C++ Libraries] #1133: compile error for parsing a string on vc2005
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-07-31 13:18:42


#1133: compile error for parsing a string on vc2005
--------------------------------+-------------------------------------------
 Reporter: pop.atry_at_[hidden] | Owner: djowel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
  Version: Boost 1.34.1 | Severity: Problem
 Keywords: |
--------------------------------+-------------------------------------------
 {{{
 #include <string>
 #include <boost/spirit/core.hpp>
 extern std::string s;
 extern boost::spirit::rule<> r;
 void compile_failed() {
   boost::spirit::parse(s.begin(), s.end(), r);
 }
 /**/
 }}}



 This is the error message the compiler reported:

 {{{
 1>parse.cpp
 1>c:\documents and
 settings\yangbo\桌面\work\research\boost\boost\spirit\core\non_terminal\impl\rule.ipp(190)
 : error C2664:
 â€œboost::spirit::impl::abstract_parser<ScannerT,AttrT>::do_parse_virtual”:
 ä¸èƒ½å°†å‚æ•° 1 从“const boost::spirit::scanner<IteratorT,PoliciesT>”转换为“const
 boost::spirit::scanner<> &”
 1> with
 1> [
 1> ScannerT=boost::spirit::scanner<>,
 1> AttrT=boost::spirit::nil_t
 1> ]
 1> and
 1> [
 1>
 IteratorT=std::_String_iterator<char,std::char_traits<char>,std::allocator<char>>,
 1> PoliciesT=boost::spirit::scanner_policies<>
 1> ]
 1> 原因如下: 无法从“const
 boost::spirit::scanner<IteratorT,PoliciesT>”转换为“const
 boost::spirit::scanner<>”
 1> with
 1> [
 1>
 IteratorT=std::_String_iterator<char,std::char_traits<char>,std::allocator<char>>,
 1> PoliciesT=boost::spirit::scanner_policies<>
 1> ]
 1> 没有可用于执行该转换的用户定义的转换运算符,或者无法调用该运算符
 1> c:\documents and
 settings\yangbo\桌面\work\research\boost\boost\spirit\core\non_terminal\impl\rule.ipp(172):
 å‚见对正在编译的函数 模板 实例化“boost::spirit::match<boost::spirit::nil_t>
 boost::spirit::impl::rule_base<DerivedT,EmbedT,T0,T1,T2>::parse_main<ScannerT>(const
 ScannerT &) const”的引用
 1> with
 1> [
 1> DerivedT=boost::spirit::rule<>,
 1> EmbedT=const boost::spirit::rule<> &,
 1> T0=boost::spirit::nil_t,
 1> T1=boost::spirit::nil_t,
 1> T2=boost::spirit::nil_t,
 1>
 ScannerT=boost::spirit::scanner<std::_String_iterator<char,std::char_traits<char>,std::allocator<char>>,boost::spirit::scanner_policies<>>
 1> ]
 1> c:\documents and
 settings\yangbo\桌面\work\research\boost\boost\spirit\core\impl\parser.ipp(28):
 å‚见对正在编译的函数 模板 实例化“boost::spirit::match<boost::spirit::nil_t>
 boost::spirit::impl::rule_base<DerivedT,EmbedT,T0,T1,T2>::parse<boost::spirit::scanner<IteratorT,PoliciesT>>(const
 ScannerT &) const”的引用
 1> with
 1> [
 1> DerivedT=boost::spirit::rule<>,
 1> EmbedT=const boost::spirit::rule<> &,
 1> T0=boost::spirit::nil_t,
 1> T1=boost::spirit::nil_t,
 1> T2=boost::spirit::nil_t,
 1>
 IteratorT=std::_String_iterator<char,std::char_traits<char>,std::allocator<char>>,
 1> PoliciesT=boost::spirit::scanner_policies<>,
 1>
 ScannerT=boost::spirit::scanner<std::_String_iterator<char,std::char_traits<char>,std::allocator<char>>,boost::spirit::scanner_policies<>>
 1> ]
 1> c:\documents and
 settings\yangbo\桌面\work\research\http_client\parse.cpp(6): 参见对正在编译的函数 模板
 å®žä¾‹åŒ–“boost::spirit::parse_info<IteratorT>
 boost::spirit::parse<std::_String_iterator<_Elem,_Traits,_Alloc>,DerivedT>(const
 IteratorT &,const IteratorT &,const boost::spirit::parser<DerivedT> &)”的引用
 1> with
 1> [
 1>
 IteratorT=std::_String_iterator<char,std::char_traits<char>,std::allocator<char>>,
 1> _Elem=char,
 1> _Traits=std::char_traits<char>,
 1> _Alloc=std::allocator<char>,
 1> DerivedT=boost::spirit::rule<>
 1> ]
 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1133>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC