error: ' boost::Q_FOREACH '没有被声明
error: ‘boost::Q_FOREACH’ has not been declared
我使用的是boost 1.54和Qt 5.2.1版本。
当我尝试构建包
时,我得到以下错误/usr/include/boost/multi_index/sequenced_index.hpp:927:10: error: 'boost::Q_FOREACH’ has not been declared
boost::foreach::tag
^
/usr/include/boost/multi_index/ordered_index.hpp:1399:10: error: ‘boost::Q_FOREACH’ has not been declared
boost::foreach::tag)
^
检查sequenced_index.hpp
, ordered_index.hpp
的标题,它们都包含foreach_fwd.hpp
和foreach.hpp
。我尝试在项目文件(.pro)
中包括CONFIG += no_keywords
。但我还是会得到这个错误。我不确定是什么原因。
需要说明的是,这个问题在即将发布的Boost 1.60版本中已经被规避了,这样你就可以让Qt定义宏foreach
。
相关文章:
- 如果C++对象的类在另一个boost模块中声明,如何使用boost将指向该对象的指针返回到python
- 隐式声明的 boost::iostreams::mapped_file_source 已被弃用
- 如何使用 Boost.Hana 声明成员变量
- boost::hana 转发声明标头的用例是什么?
- 如何将前向声明与 boost::msm 一起使用以避免循环依赖?
- 使用 boost program_options时,如何确保声明具有C++的存储类或类型说明符?
- 在此范围内未声明C boost -_______SERT_FAIL
- 声明“const”“boost::range”的正确方法
- 我如何转发声明boost ::精神统治
- Boost MPL-按顺序声明每种类型的类
- 为什么 boost::qi 规则的属性必须用括号声明?
- 如何声明Boost范围适配器(例如MAP_VALUES)
- 正向声明boost.type_erasure引用类型
- boost:asio ::UnregisterWaitEx 尚未声明
- 使用 boost::spirit 解析类似 c 结构的声明
- 为什么预先声明 std::basic_string<T> 会破坏 boost::regex?
- 正向声明boost::multi_index_container对象
- 如何转发声明boost智能ptr
- 如何在mpl::list中声明boost递归变体
- 如何转发声明 boost::p tree::iterator