microsoft / microsoft/vscode-cpptools

C++23 literal operator for std::size_t not recognized

Open
#13,371 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Environment
  • OS and Version: Win11
  • VS Code Version: 1.98.2
  • C/C++ Extension Version: 1.23.6
Bug Summary and Steps to Reproduce

Bug Summary:

C++23 added literal operators for std::size_t, and MSVC added support for them with 19.43. I am using cl.exe as compiler for intellisense and have the C++ version set to C++23. I get squiggly line errors when using the Z and UZ suffixes.

Image

Steps to reproduce:

  1. Set intellisense compiler to windows-msvc-x64
  2. Open a C++23 source file
  3. Use the Z or UZ literal operators

Expected behavior:
Accepted as correct literal.

Configuration and Logs
{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.22621.0",
            "intelliSenseMode": "windows-msvc-x64",
            "cppStandard": "c++23",
            "cStandard": "c23"
        }
    ],
    "version": 4
}
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 issue in a C++23 source file using the supplied Windows MSVC IntelliSense configuration and the Z or UZ suffixes. Trace the IntelliSense handling of these C++23 literal operators; done means the literals are accepted without squiggle errors when using MSVC 19.43 or later.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.