pc-lint迭代器报错的问题
我已经在std.ltn中包含了STL库文件。为何在代码检查的时候遇到迭代器还是会报错。
错误如下:
error 48: (Error -- Bad type)
error 48: (Error -- Bad type)
error 1013: (Error -- Symbol 'symbol' not a member of class '_Iterator')
请问各位高人,如何配置工具的选项文件才不会产生这些信息。
[解决办法]
创建一个lib-stl.lnt,并添加到std.lnt中
lib-stl.lnt内容:
// lib-stl.lnt// PC-lint options for the Standard Template Library++template(1) // agressively compile base classes // The following options inhibit messages emitted when // processing library headers.-elib(601) // types are not always explicit in templates-e1501 // members having 0 length-e1502 // classes having no data members-e1702 // same operator defined globally and as class member-e1757 // STL convention is to use x++ rather than ++x.-elib(1505) // allows inheritance access specifier to default-elib(1515) // members fail to have constructors-elib(1725) // allows elements of structs to be references-elib(1727) // inline functions not declared inline-esym(1702,operator*) // both member and non-member ops // the following options were developed explicitly for the // Microsoft Standard Template library (MS VC 5.0) //-elib(665) // macro _STCONS 3rd argument is not parenthesized-elib(778) // a constant expression evaluates to 0-esym(1039,valarray<<1>>::operator[]) // inhibit false message-esym(1015,value_type) // problems processing default template ...-esym(1702,operator==) // used as both a binary and a member operator-elib(1054) // ... argument for priority_queue< ... >