Bug: Spurious IntelliSense errors with C++20 Modules
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- cpp
調査の方向性
Visual Studio Insiders と MSVC 14.52 Preview で、import std、import winrt_base、import winrt.Windows.Foundation を使用する再現可能な C++20 Modules の例から始めます。IntelliSense の動作を同等のヘッダーベースのプロジェクトと比較し、エラーで言及されている生成済みの winrt\base.h を確認します。cppwinrt 側で E1776 の誤検出に対する回避策を特定するか、この問題を DevCom-11123562 で解決する必要があることを確認できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Version
3.0.260715.1
Summary
A simple project that uses C++/WinRT with the new C++20 Modules feature can build successfully with MSVC 14.52 Preview in Visual Studio Insiders, but has IntelliSense errors in the IDE that get in the way of return type deduction and similar. For instance, the example code causes this IntelliSense error:
function "winrt::Windows::Foundation::IUnknown::operator new(size_t)" (declared at line 2117 of module "winrt_base" ("D:\...\winrtmodcom\x64\Debug\Generated Files\winrt\base.h")) cannot be referenced -- it is a deleted function
More likely than not, this is simply an IDE and IntelliSense bug and I've reported it as such in DevCom-11123562. Anyone who cares about this scenario is welcome to upvote it. Having said that, if there's any workaround that can be implemented on the cppwinrt side to mitigate these IntelliSense failures, it would be a welcome improvement to the user experience.
Reproducible example
import std;
import winrt_base;
import winrt.Windows.Foundation;
winrt::Windows::Foundation::IAsyncOperation<winrt::hstring> GetStringAsync()
{
co_return L"Hello, World!";
}
winrt::Windows::Foundation::IAsyncOperation<winrt::hstring> foo()
{
auto str = co_await GetStringAsync(); // IntelliSense labels this <error type> instead of figuring out it is a winrt::hstring.
co_return str;
}
Expected behavior
IntelliSense should be fully functional with cppwinrt C++20 Modules in scenarios that work correctly with header files.
Actual behavior
IntelliSense reports spurious E1776 errors and fails to deduce return types
Additional comments
No response
- 主要言語
- C++
- スター
- 1.9k
- フォーク
- 281
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/cppwinrt のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 20/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
microsoft/cppwinrt の issue をすべて見る
似ている issue
-
bug build
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
facebookincubator/velox#19194 ·
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW オープンfuzz
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ClickHouse/ClickHouse#122114 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
module/agent platform/macos type/bug/regression
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
enhancement PyCDE
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100