program_options.hpp fails when imported as a header unit (MSVC 2022).
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by compiling the supplied main.cpp with MSVC 2022 in C++20 mode and importing boost/program_options.hpp as a header unit. Inspect boost/exception/exception.hpp around line 297 while comparing the header-unit failure with a normal include. Done means the example compiles successfully with the header-unit import.
Written by the indexing model from the issue text.
Description
The program fails to compile when trying to import program_options.hpp as a header unit in Visual Studio 2022 (C++20).
main.cpp
import <boost/program_options.hpp>;
int main(int argc, char** argv)
{
namespace po = boost::program_options;
po::options_description desc;
desc.add_options()
("stringtest", po::value<std::string>()->implicit_value("test"), "string test")
;
return 0;
}
You'll get the following error:
Error - C3084 - 'boost::exception::~exception': a destructor cannot be 'abstract' - solution - E:\Projects\CPP\boost\boost\exception\exception.hpp - 297
I haven't had any troubles with any other boost headers. This is the only one I've run into with this issue. This was tested with the latest master branch.
- Dominant language
- C++
- Stars
- 136
- Forks
- 117
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/program_options
-
Provide C++20 module Open
Difficulty 5/5 Over a week Newbie friendliness 45/100
boostorg/program_options#160 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
boostorg/program_options#159 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
boostorg/program_options#147 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
boostorg/program_options#146 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
boostorg/program_options#144 ·
All issues in boostorg/program_options
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
duckdb/duckdb-wasm#2258 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
objectionary/eo-graphs#75 ·
-
Coarray integration tests carry no LABELS, so run_tests.py silently skips them under every backend Opencoarray
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
FISCO-BCOS/FISCO-BCOS#5642 ·