Eclipse Indigo 代码分析因 boost 而失败
Eclipse Indigo Service Release 2 无法解析 Boost 库的
标头,因此将 boost::is_base_of
报告为未定义。特别是,这会禁用使用此类的宏扩展。
以下是演示此问题的代码示例(源代码):
Eclipse 在 DECLARE_TYPE(Foo, Bar)
线上抱怨错误 Symbol无法解析“is_base_of”
。 Boost 包含路径被添加到项目包含路径中,并且 Eclipse 不会抱怨它。 Eclipse 不会对 boost/type_traits/is_base_of.hpp
中的任何行进行抱怨。
如何让Eclipse扩展宏?
Eclipse Indigo Service Release 2 fails to parse <boost/type_traits/is_base_of.hpp>
header of Boost library and thus reports boost::is_base_of
as undefined. In particular this disables macro expansion that uses this class.
Here is code sample that demonstrates this problem (source code):
Eclipse complains on line DECLARE_TYPE(Foo, Bar)
with error Symbol 'is_base_of' could not be resolved
. Boost include path is added to the project include paths and Eclipse does not complain about it. Eclipse doesn't complain on any line in boost/type_traits/is_base_of.hpp
.
How to make Eclipse expand the macro?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如 https://bugs.eclipse.org/bugs/show_bug.cgi?id=373208" 中讨论的那样id=373208 这是一个错误,但最新的夜间构建和 Juno 里程碑已修复它。问题是当前版本的 Eclipse 不支持
boost/type_traits/is_base_of.hpp
中使用的条件包含。因此,当使用最新版本或 Juno 里程碑时,宏会正确扩展。
As discussed in https://bugs.eclipse.org/bugs/show_bug.cgi?id=373208 this is a bug, but latest nightly build and Juno milestone have it fixed. The problem is that current release of Eclipse doesn't support conditional includes which are used in
boost/type_traits/is_base_of.hpp
.Thus when using the latest build or Juno milestone -- macro is correctly expanded.