2012-11-14 42 views
0

我有使用boost :: bimap的flinting代碼片段的問題。我有一個簡單bimap.cpp,看起來像這樣:FlexeLint和boost :: bimap

#include <boost/bimap.hpp> 

typedef boost::bimap<int, double> TestBimap; 

int main() 
{ 
    TestBimap flintTest; 
    return 0; 
} 

不完美的人,我知道,但它只是一個例子。我運行它的火石:

flint --i../flexelint_cfg/ --i/home/rat/boost/1.45.0/include ../flexelint_cfg//co-gcc.lnt bimap.cpp 

和燧石返回大量的錯誤。從上面的幾個是:

--- Module: bimap.cpp (C++)$ 
    $ 
     While instantiating boost::bimaps::bimap<int,double> at File bimap.cpp line 7$ 
     While instantiating boost::bimaps::detail::bimap_core<int,double,mpl_::na,mpl_::na,mpl_::na>$ 
     at File /boost/1.45.0/include/boost/bimap/bimap.hpp$ 
     line 137$ 
     While instantiating struct boost::bimaps::detail::manage_bimap_key<int> at$ 
     File /boost/1.45.0/include/boost/bimap/detail/bimap_core.hpp$ 
     line 90$ 
     While instantiating struct boost::bimaps::set_of<int> at File$ 
     /boost/1.45.0/include/boost/bimap/detail/manage_bimap_key.hpp$ 
     line 69$ 
     While instantiating struct boost::concepts::requirement_<void$ 
     (*)(boost::AssignableConcept<int>)> at File /boost/1.45.0/include/boost/bimap/set_of.hpp$ 
     line 130$ 
     While instantiating struct boost::AssignableConcept<int> at File$ 
     /boost/1.45.0/include/boost/concept/detail/general.hpp$ 
     line 54$ 
     While instantiating struct boost::Assignable<int> at File$ 
     /boost/1.45.0/include/boost/concept_check.hpp$ 
     line 137$ 
     While instantiating struct boost::concepts::requirement_<void$ 
     (*)(boost::concepts::usage_requirements<boost::Assignable<int>>)> at File$ 
     /boost/1.45.0/include/boost/concept_check.hpp$ 
     line 139$ 
     While instantiating struct boost::mpl::if_<boost::concepts::not_satisfied<boost::concepts::usage_requirements<boost::Assignable<int>$ 
    >>,boost::concepts::constraint<boost::concepts::usage_requirements<boost::Assignable<int>>>,boost::concepts::requirement<boost::concepts::f$ 
    ailed ************usage_requirements::************>> at File$ 
     /boost/1.45.0/include/boost/concept/detail/general.hpp$ 
     line 56$ 
     While instantiating struct boost::concepts::not_satisfied<boost::concepts::usage_requirements<boost::Assignable<int>$ 
    >> at File /boost/1.45.0/include/boost/mpl/if.hpp$ 
     line 63$ 
          _$ 
     TestBimap flintTest;$ 
    /boost/1.45.0/include/boost/concept/detail/has_constraints.hpp $ 
     44 Error 1015: Symbol 'constraints' not found in class$ 
    bimap.cpp 7 Info 831: Reference cited in prior message$ 
    /boost/1.45.0/include/boost/bimap/bimap.hpp $ 
     137 Info 831: Reference cited in prior message$ 
    /64bit/boost/1.45.0/include/boost/mpl/if.hpp $ 
     63 Info 831: Reference cited in prior message$ 
    /boost/1.45.0/include/boost/bimap/detail/bimap_core.hpp $ 
     90 Info 831: Reference cited in prior message$ 
    /boost/1.45.0/include/boost/concept_check.hpp $ 
     137 Info 831: Reference cited in prior message$ 
    /boost/1.45.0/include/boost/concept_check.hpp $ 
     139 Info 831: Reference cited in prior message$ 
    /boost/1.45.0/include/boost/concept/detail/general.hpp $ 
     54 Info 831: Reference cited in prior message$ 
    /boost/1.45.0/include/boost/concept/detail/general.hpp $ 
     56 Info 831: Reference cited in prior message$ 
    /boost/1.45.0/include/boost/bimap/detail/manage_bimap_key.hpp $ 
     69 Info 831: Reference cited in prior message$ 
    /boost/1.45.0/include/boost/bimap/set_of.hpp $ 
     130 Info 831: Reference cited in prior message$ 

我FlexeLint的版本是:

FlexeLint for C/C++ (Unix) Vers. 9.00i, Copyright Gimpel Software 1985-2012 

我花了幾個小時試圖使它的工作,但沒有運氣。任何人碰到同樣的問題,並有解決方案?這是錯誤的配置 - 我可以發佈我的配置,如果這是必需的。

我會非常感謝幫助

最好的問候!

PS:flexelint標籤請;>?

回答

0

對於那些碰到與我相同問題的人。我直接向Gimepl支持問了這個問題,他們回答說這是FlexeLint沒有處理C++ 11 variadic模板的問題。所以,現在,只有解決方法是通過-elib和-e選項來抑制這些警告。