c++visual-studiostlvisual-studio-2022std-ranges

IntelliSense engine crashed for file with ranges


Visual Studio 2022 (recent version, 17.7.7) IntelliSense crashes with the code below.

Steps to reproduce

  1. Copy/paste the code to the IDE
  2. Change the code, for example uncomment std::vector<int> values2(10);

In some seconds the IDE will show the message:

IntelliSense engine crashed for file ‘…’

Questions

  1. Am I the only person who has this issue?
  2. Am I correct that the code itself is correct?
  3. Could it be related to the IntelliSense engine crashed for file or IntelliSense engine crashes on Visual Studio 2022 version 17.7.4 when using std::views::ranges bug reports?
  4. Are there any known workarounds?

The code

#include <ranges>
#include <vector>

int main()
{
    std::vector<int> values(10);
    // std::vector<int> values2(10);

    auto range = std::ranges::subrange(values.begin(), values.end());
}

Solution

  • With the recent update of Visual Studio 2022 the issue has been resolved.