Skip to content

When will intelliSense fully support module syntax? #13987

@hxznhf

Description

@hxznhf

Environment

  • OS and Version: Windows11 24h2
  • VS Code Version: 1.104.3
  • C/C++ Extension Version: 1.28.1
  • If using SSH remote, specify OS of remote machine:

Bug Summary and Steps to Reproduce

At present, the only way to enable IntelliSense to recognize symbols in the module is through the _INTELLISENSE macro. This problem has been going on for too long. Can the official provide a future support plan! When can we truly utilize the C++20 module features.

// main.cpp
#include <iostream>

#ifdef __INTELLISENSE__
#include "test.ixx"
#endif

import test;

int main(int argc, char** argv) {
    std::cout << "hello world!" << std::endl;
    test();
    A a;
    a.f();
    a.g();

    return 0;
}

// test.ixx
export module test;

import std;

#define abc 123


export void test() {
    std::cout << "test" << std::endl;
}


export class A {
public:
    void f() {
        std::cout << "A::f()" << std::endl;
    }
    void g() {
        std::cout << "A::g()" << std::endl;
    }
};

Configuration and Logs

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.26100.0",
            "compilerPath": "cl.exe",
            "cStandard": "c17",
            "cppStandard": "c++23",
            "intelliSenseMode": "windows-msvc-x64"
        }
    ],
    "version": 4
}

Other Extensions

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions