microsoft / microsoft/vscode-cpptools

I'm doing template hell. It reports a template error, even though it actually compiles fine.

Open
#11,548 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Language Service
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Environment
Version: 1.84.0-insider (user setup)
Commit: 58bdf2c7c40be6f4494ae35a09528708832cf357
Date: 2023-10-18T05:50:15.982Z
Electron: 25.9.1
ElectronBuildId: 24472542
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19045
  • OS: Windows 10 22H2
  • C/C++ Extension Version: v1.18.0
Bug Summary and Steps to Reproduce

Bug Summary: Incorrect error detector for template hell.

Steps to reproduce:

  1. Make a new project, and put this code in: https://godbolt.org/z/f1EadG3dE
  2. Wait a bit for IntelliSense to load
  3. Go to example.cpp
  4. See error
    image

Expected behavior: No error reported as it compiles fine(See godbolt).

Configuration and Logs
{
    "configurations": [
        {
            "name": "windows-gcc-x64",
            "includePath": [
                "E:\\include"
            ],
            "compilerPath": "D:\\msys64\\mingw64\\bin\\g++.exe",
            "cStandard": "${default}",
            "cppStandard": "c++23",
            "intelliSenseMode": "windows-gcc-x64",
            "compilerArgs": [
                "-fno-ms-extensions"
            ]
        }
    ],
    "version": 4
}

lslogging.txt

Other Extensions

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report in example.cpp using the supplied Windows GCC configuration and compare the result with the Godbolt example. Start by reviewing lslogging.txt and the IntelliSense error for the template code. Done means the code continues to compile and IntelliSense no longer reports an error for this reproducer.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.