microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.54k stars 1.56k forks source link

mdspan #11295

Open danchitnis opened 1 year ago

danchitnis commented 1 year ago

Environment

Bug Summary and Steps to Reproduce

Bug Summary: I am trying to use the mdspan in VSCode. I am using the parameters in Godbolt example and made a test. The code compiles without warnings or errors, however, VSCode intellisense shows an error. I have matched the compile flags with VScode c_cpp_properties.json, however, the error still persists.

Steps to reproduce:

  1. Go to 'https://github.com/danchitnis/mdspan-test'
  2. Close and open with VSCode
  3. modify the c_cpp_properties.json, to point to your g++ compiler
  4. See the highlighted errors in VSCode

Expected behavior: No highlighted errors

Configuration and Logs

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/include"
            ],
            "defines": ["_DEBUG", "UNICODE", "_UNICODE"],
            "cStandard": "c23",
            "cppStandard": "c++23",
            "intelliSenseMode": "windows-clang-x64",
            "compilerPath": "c:/msys64/ucrt64/bin/g++.exe",
            "compilerArgs": [
                "-std=c++23"
            ]
        }
    ],
    "version": 4
}

Other Extensions

No response

Additional context

Errors are:

no instance of constructor "std::extents<IndexType, Extents...>::extents [with IndexType=unsigned long long, Extents=<18446744073709551615ULL, 18446744073709551615ULL>]" matches the argument listC/C++(289) test.cpp(13, 45): argument types are: (int, int)

expression preceding parentheses of apparent call must have (pointer-to-) function typeC/C++(109)

michelleangela commented 1 year ago

@danchitnis Thank you for submitting this issue. I was able to reproduce it with the sample project.

We'll further investigate to see if we can simplify the repro for our IntelliSense engine team to look at.

michelleangela commented 1 year ago

Adding note: internal bug number 1870661.

nluka commented 11 months ago

Any progress on this? Getting this error from Intellisense even though my code compiles using MSVC