2010-11-01 73 views
0

我在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足以知道這意味着什麼?

+1

我想看看cpp_iterator.hpp,試圖弄清楚到底哪種類型它認爲是無法分配。 – aschepler 2010-11-01 17:06:47

+0

會給你一個鏡頭,並在必要時編輯帖子! – Michael 2010-11-01 17:09:17

+0

我不認爲它的cpp部分,提升概念檢查是檢查那裏的作業和複製操作員 – Michael 2010-11-01 18:08:44

回答

1

這是一個已知問題(請參閱Boost票#1079),但不是在Wave中,而是在Spirit的(V1.x)分析樹生成代碼中。概念檢查抱怨一個不完整的類型。

此錯誤僅在使用gcc和使用--enable-概念檢查或者將#define _GLIBCXX_CONCEPT_CHECKS編譯波時彈出1

+0

謝謝!這讓我瘋狂。好的,現在我必須弄清楚如何解決它。 – Michael 2010-11-01 23:37:17