我在boost和gcc中調試概念檢查。該代碼的發現都是這樣Boost wave context concept_check問題
/home/hoffman34/boostlibsinstall64/include/boost/wave/util/
cpp_iterator.hpp:2495:1: instantiated from
'boost::wave::pp_iterator<boost::wave::context<__gnu_cxx::__normal_iterator<char*,
std::basic_string<char> >,
boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<> >,
boost::wave::iteration_context_policies::load_file_to_string,
advanced_preprocessing_hooks> >'
../../../../ROSE/src/frontend/SageIII/attachPreprocessingInfo.C:408:34: instantiated
from here
/nfs/apps/gcc/4.5.0/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include
/c++/4.5.0/bits/boost_concept_check.h:209:7: error: using invalid field
'__gnu_cxx::_SGIAssignableConcept<_Tp>::__a'
make[6]: *** [attachPreprocessingInfo.lo] Error 1
錯誤它指的是我此行
context_type::iterator_type first = ctx.begin();
context_type::iterator_type last = ctx.end();
408是第一行有,但409是如此的相似我想象它會有同樣的問題。
context_type被定義爲這樣
typedef boost::wave::context<std::string::iterator, lex_iterator_type,
boost::wave::iteration_context_policies::load_file_to_string,
advanced_preprocessing_hooks > context_type;
iterator_type應該是上下文的一部分。有誰知道Boost :: Wave足以知道這意味着什麼?
我想看看cpp_iterator.hpp,試圖弄清楚到底哪種類型它認爲是無法分配。 – aschepler 2010-11-01 17:06:47
會給你一個鏡頭,並在必要時編輯帖子! – Michael 2010-11-01 17:09:17
我不認爲它的cpp部分,提升概念檢查是檢查那裏的作業和複製操作員 – Michael 2010-11-01 18:08:44