boostorg / boostorg/program_options
program_options.hpp fails when imported as a header unit (MSVC 2022).
- 主要言語
- C++
- スター
- 136
- フォーク
- 117
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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 ;
int main(int argc, char** argv)
{
namespace po = boost::program_options;
po::options_description desc;
desc.add_options()
("stringtest", po::value()->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.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、提供された main.cpp を MSVC 2022 の C++20 モードでコンパイルし、boost/program_options.hpp を header unit としてインポートします。通常の include と header unit の失敗を比較しながら、boost/exception/exception.hpp の 297 行目付近を調査します。header unit のインポートで例が正常にコンパイルできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100