-Wno-deprecated-declarations needed to compile boost-1.89 with -Werror on

未关闭
#1,101 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp
领域
build-system

调研方向

首先检查 boost/multi_array/storage_order.hpp 和 boost/array.hpp,尤其是已弃用的 assign 调用,以及报告中显示的 Boost.Deprecated 定义。检查相关的 Boost.MultiArray 测试或构建配置,确认是否使用 Clang 和 -Werror 进行编译;当 Boost 1.89 的头文件能够编译且不要求使用者抑制此弃用警告时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

When upgrading from boost-1.86 to 1.89, got the following error when building my files that include boost headers:

In file included from src/ComputeStats.cpp:18:
In file included from /dsat/boost/rhel8_intel64_icpx/include/boost/multi_array.hpp
In file included from /dsat/boost/rhel8_intel64_icpx/include/boost/multi_array/base.hpp
/dsat/boost/rhel8_intel64_icpx/include/boost/multi_array/storage_order.hpp:51:18: error: 'assign' is deprecated: please use 'fill' instead [-Werror, -Wdeprecated-decratations]
   51 |   ascending_.assign(true);
        |
/dsat/boost/rhel8_intel64_icpx/include/boost/multi_array/multi_array_ref.hpp:113:18: note: in instantiation of member function 'boost:general_storage_order<2>::general_storage_order' requested here
  113 |   base_(base), storage_(c_storage_order()) {
         |
....
/dsat/boost/rhel8_intel64_icpx/include/boost/array.hpp:193:9: note: 'assign' has been explicitly marked deprecated here
 193 |   BOOST_DEPRECATED( "please use 'fill' instead" )
        |
/dsat/boost/rhel8_intel64_icpx/include/boost/config/compiler/clang.hpp:346:46: note: expanded from macro 'BOOST_DEPRECATED'
 346 | #define BOOST_DEPRECATED(msg) __attribute__((deprecated(msg)))
1 error generated

I can work around this by adding -Wno-deprecated-declarations to my cxx flags, but since this is internal to boost, I think it should be addressed. Thank you!

主要语言
HTML
星标
8.6k
派生
2k
平均合并
9 小时 35 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

boostorg/boost 的其他 Issue

查看 boostorg/boost 的全部 Issue

相似的 Issue

更多 Build System Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。