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

Open
#1,101 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
build-system

Research direction

Start by reviewing boost/multi_array/storage_order.hpp and boost/array.hpp, especially the deprecated assign call and the Boost.Deprecated definition shown in the report. Check the relevant Boost.MultiArray tests or build configuration for compilation with Clang and -Werror; done means Boost 1.89 headers compile without requiring consumers to suppress this deprecation warning.

Written by the indexing model from the issue text.

Description

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!

Dominant language
HTML
Stars
8.6k
Forks
2k
Avg merge
9h 35m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/boost

All issues in boostorg/boost

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.