microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intellisense is totally broken when I include this header file

AlseinX opened this issue · comments

Environment

  • OS and Version: macOS 14.5 (23F79) arm64
  • VS Code Version: 1.89.1 (Universal)
  • C/C++ Extension Version: v1.20.5
  • If using SSH remote, specify OS of remote machine: Rocky Linux release 9.2 x64

Bug Summary and Steps to Reproduce

Bug Summary:
Including the following head file makes IntelliSense (default engine) totally broken, reporting a lot of unknown identifier and syntax errors(like missing ';').
The C/C++ extension is configured with cmake configuration provider, with all compile_commands.json correctly generated and all header files found.
The configured compiler is Clang/Clang++ 18.1.4.

#pragma once

#include <cstring>
#include <string>
#include <charconv>

namespace desk
{
    template <typename Dst, typename Src>
    concept CustomAssignable = requires(Dst &dst, Src &&src) {
        dst = src;
    };

    template <typename T>
    concept FromChars = requires(T v, const char *c) {
        std::from_chars(c, c, v);
    };

    template <typename T>
    concept ToChars = requires(T v, char *c) {
        std::to_chars(c, c, v);
    };

    template <typename T>
    concept ToString = requires(T v) {
        std::to_string(v);
    };

    template <typename Dst, typename Src>
        requires(CustomAssignable<Dst, Src>)
    inline auto fill(Dst &dst, Src &&src) -> void
    {
        dst = src;
    }

    template <unsigned int SIZE>
    inline auto fill(char (&dst)[SIZE], const char *src) -> void
    {
        strncpy(dst, src, SIZE);
    }

    template <unsigned int SIZE>
    inline auto fill(char (&dst)[SIZE], const std::string &src) -> void
    {
        strncpy(dst, src.c_str(), SIZE);
    }

    template <unsigned int SIZE>
    inline auto fill(char (&dst)[SIZE], std::string &&src) -> void
    {
        strncpy(dst, src.c_str(), SIZE);
    }

    template <unsigned int SIZE, ToChars Src>
    inline auto fill(char (&dst)[SIZE], Src &&src) -> void
    {
        std::to_chars(dst, dst + SIZE, src);
    }

    inline auto fill(std::string &dst, ToChars auto &&src) -> void
    {
        dst = std::move(std::to_string(src));
    }

    inline auto fill(FromChars auto &dst, std::convertible_to<std::string_view> auto &&src) -> bool
    {
        std::string_view v(src);
        auto [_, ec] = std::from_chars(v.cbegin(), v.cend(), dst);
        return ec == std::errc{};
    }

    template <unsigned int SIZE>
    inline auto fill(char (&dst)[SIZE], std::convertible_to<std::string_view> auto &&src) -> void
    {
        std::string_view v(src);
        if (SIZE > v.size())
        {
            strncpy(dst, v.data(), v.size());
            dst[v.size()] = '\0';
        }
        else
        {
            strncpy(dst, v.data(), SIZE);
        }
    }

    template <typename T>
    inline auto fill(T &dst) -> void
    {
        auto ptr = (uint8_t *)&dst;
        std::fill(ptr, ptr + sizeof(T), 0);
    }

    template <typename T, unsigned int SIZE>
    inline auto fill(T (&dst)[SIZE]) -> void
    {
        std::fill(dst, dst + SIZE, 0);
    }
}

Steps to reproduce:

  1. #include this header into my .cpp file
  2. Save and See a lot of false negative errors.
  3. Build with CMake extension.
  4. These errors disappear on building completion, and come back again in a few seconds.
  5. Clean and re-configure cmake, delete intellisense cache, set C_Cpp.intelliSenseMemoryLimit and intelliSenseCacheSize to a large enough number, kill the remote SSH host, and reload the VSCode.
  6. See these false negative errors again.

Expected behavior:
No error or warnings, as it builds with no errors or warnings.

Configuration and Logs

`c_cpp_properties.json`

{
    "configurations": [
        {
            "name": "CMake",
            "compileCommands": "${config:cmake.buildDirectory}/compile_commands.json",
            "configurationProvider": "ms-vscode.cmake-tools",
            "intelliSenseMode": "clang-x64",
            "cppStandard": "c++23",
            "cStandard": "c17"
        }
    ],
    "version": 4
}

C/C++: Log Diagnostics

-------- Diagnostics - 5/23/2024, 11:15:10 AM
Version: 1.20.5
Current Configuration:
{
    "name": "CMake",
    "compileCommands": "/home/yhxiang/repos/quantdev/build/compile_commands.json",
    "configurationProvider": "ms-vscode.cmake-tools",
    "intelliSenseMode": "clang-x64",
    "cppStandard": "c++23",
    "cStandard": "c17",
    "compilerPathIsExplicit": false,
    "cStandardIsExplicit": true,
    "cppStandardIsExplicit": true,
    "intelliSenseModeIsExplicit": true,
    "compileCommandsInCppPropertiesJson": "${config:cmake.buildDirectory}/compile_commands.json",
    "configurationProviderInCppPropertiesJson": "ms-vscode.cmake-tools",
    "mergeConfigurations": false,
    "browse": {
        "path": [
            "${workspaceFolder}"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}
Custom browse configuration: 
{
    "browsePath": [
        "/home/yhxiang/repos/quantdev/desk2/loader/src",
        "/home/yhxiang/repos/quantdev/desk2/hr/include",
        "/home/yhxiang/third/zjcf/include",
        "/home/yhxiang/repos/quantdev/desk2/common/include",
        "/home/yhxiang/repos/quantdev/msgbus/include",
        "/home/yhxiang/repos/quantdev/desk2/hr/src",
        "/home/yhxiang/third/zxjt/include",
        "/home/yhxiang/third/zxzq/include",
        "/home/yhxiang/repos/quantdev/desk2/common/src",
        "/home/yhxiang/repos/quantdev/build/_deps/lh-desk-common-build/CMakeFiles",
        "/home/yhxiang/repos/quantdev/msgbus/cpp",
        "/home/yhxiang/repos/quantdev/desk2/dfcf/include",
        "/home/yhxiang/third/dfcf/include",
        "/home/yhxiang/repos/quantdev/desk2/dfcf/src"
    ],
    "compilerPath": "/home/yhxiang/miniconda3/bin/clang++",
    "compilerArgs": [],
    "compilerFragments": [
        "-g -std=gnu++2b"
    ]
}
cpptools version (native): 1.20.5.0
Translation Unit Mappings:
[ /home/yhxiang/repos/quantdev/desk2/common/include/desk/fill.h - source TU]:
[ /home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp - source TU]:
    /home/yhxiang/repos/quantdev/desk2/common/include/desk.h
Translation Unit Configurations:
[ /home/yhxiang/repos/quantdev/desk2/common/include/desk/fill.h ]:
    Process ID: 354057
    Memory Usage: 94 MB
    Compiler Path: /home/yhxiang/miniconda3/bin/clang
    Includes:
        /home/yhxiang/miniconda3/lib/gcc/x86_64-conda-linux-gnu/13.2.0/include/c++
        /home/yhxiang/miniconda3/lib/gcc/x86_64-conda-linux-gnu/13.2.0/include/c++/x86_64-conda-linux-gnu
        /home/yhxiang/miniconda3/lib/gcc/x86_64-conda-linux-gnu/13.2.0/include/c++/backward
        /home/yhxiang/miniconda3/lib/clang/18/include
        /home/yhxiang/miniconda3/x86_64-conda-linux-gnu/sysroot/usr/include
    Standard Version: c++23
    IntelliSense Mode: linux-clang-x64
    Other Flags:
        --clang
        --clang_version=180104
[ /home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp ]:
    Process ID: 353888
    Memory Usage: 176 MB
    Compiler Path: /home/yhxiang/miniconda3/bin/clang++
    Includes:
        /home/yhxiang/repos/quantdev/desk2/dfcf/include
        /local/share/third/dfcf/include
        /home/yhxiang/repos/quantdev/desk2/common/include
        /home/yhxiang/repos/quantdev/msgbus/include
        /home/yhxiang/miniconda3/lib/gcc/x86_64-conda-linux-gnu/13.2.0/include/c++
        /home/yhxiang/miniconda3/lib/gcc/x86_64-conda-linux-gnu/13.2.0/include/c++/x86_64-conda-linux-gnu
        /home/yhxiang/miniconda3/lib/gcc/x86_64-conda-linux-gnu/13.2.0/include/c++/backward
        /home/yhxiang/miniconda3/lib/clang/18/include
        /home/yhxiang/miniconda3/x86_64-conda-linux-gnu/sysroot/usr/include
    Standard Version: c++23
    IntelliSense Mode: linux-clang-x64
    Other Flags:
        --clang
        --clang_version=180104
Total Memory Usage: 271 MB
Browse Paths from compile_commands.json, from workspace folder: /home/yhxiang/repos/quantdev
    /home/yhxiang/repos/quantdev/build/_deps/lh-desk-common-build/CMakeFiles
    /home/yhxiang/repos/quantdev/desk2/common/include
    /home/yhxiang/repos/quantdev/desk2/common/src
    /home/yhxiang/repos/quantdev/desk2/dfcf/include
    /home/yhxiang/repos/quantdev/desk2/dfcf/src
    /home/yhxiang/repos/quantdev/desk2/hr/include
    /home/yhxiang/repos/quantdev/desk2/hr/src
    /home/yhxiang/repos/quantdev/desk2/loader/src
    /home/yhxiang/repos/quantdev/msgbus/cpp
    /home/yhxiang/repos/quantdev/msgbus/include
    /home/yhxiang/third/dfcf/include
    /home/yhxiang/third/zjcf/include
    /home/yhxiang/third/zxjt/include
    /home/yhxiang/third/zxzq/include

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 2200
Number of files parsed: 659

language server log

LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (invoked) cpptools/didChangeTextEditorSelection
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (invoked) cpptools/didChangeTextEditorSelection
LSP: (received) textDocument/documentHighlight: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 141)
LSP: (invoked) textDocument/documentHighlight: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 141)
LSP: Sending response (id: 141)
Database safe to open.
LSP: (received) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 142)
LSP: (invoked) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 142)
LSP: Sending response (id: 142)
LSP: (received) cpptools/formatDocument: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 143)
LSP: (invoked) cpptools/formatDocument: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 143)
Formatting document: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h
Formatting Engine: clangFormat
/home/yhxiang/.vscode-server/extensions/ms-vscode.cpptools-1.20.5-linux-x64/bin/../LLVM/bin/clang-format '-style={ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Allman, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All, FixNamespaceComments: false }' -fallback-style=LLVM -sort-includes=0 --Wno-error=unknown -assume-filename=/home/yhxiang/repos/quantdev/desk2/common/include/desk.h
LSP: Sending response (id: 143)
LSP: (received) textDocument/willSaveWaitUntil: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 144)
LSP: (invoked) textDocument/willSaveWaitUntil: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 144)
LSP: Sending response (id: 144)
willSaveWaitUntil: 0ms
LSP: (received) textDocument/didSave: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h
LSP: (invoked) textDocument/didSave: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h
Intellisense update pending for: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h
LSP: (received) cpptools/fileChanged: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h
LSP: (invoked) cpptools/fileChanged: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h
IntelliSense update scheduled and TU acquisition started for: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h
Update IntelliSense time (sec): 0.008
LSP: (received) cpptools/getFoldingRanges: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 145)
LSP: (invoked) cpptools/getFoldingRanges: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 145)
LSP: Sending response (id: 145)
LSP: (received) cpptools/getDocumentSymbols: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 146)
LSP: (invoked) cpptools/getDocumentSymbols: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 146)
  tag parsing file: /home/yhxiang/repos/quantdev/desk2/common/include/desk.h
LSP: Sending response (id: 146)
LSP: (received) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 147)
LSP: (invoked) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 147)
LSP: Sending response (id: 147)
Database safe to open.
LSP: (received) cpptools/getDiagnostics (id: 148)
LSP: (invoked) cpptools/getDiagnostics (id: 148)
LSP: Sending response (id: 148)
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeActiveEditor: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h
LSP: (invoked) cpptools/didChangeActiveEditor: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 149)
LSP: (invoked) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk.h (id: 149)
LSP: Sending response (id: 149)
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 150)
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeActiveEditor: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (invoked) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 150)
LSP: Sending response (id: 150)
LSP: (invoked) cpptools/didChangeVisibleTextEditors
Intellisense update pending for: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: (invoked) cpptools/didChangeActiveEditor: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: (invoked) cpptools/didChangeTextEditorSelection
IntelliSense update scheduled and TU acquisition started for: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: (received) cpptools/getFoldingRanges: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 151)
LSP: (invoked) cpptools/getFoldingRanges: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 151)
LSP: Sending response (id: 151)
LSP: (received) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 152)
LSP: (invoked) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 152)
LSP: Sending response (id: 152)
LSP: (received) cpptools/getDocumentSymbols: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 153)
LSP: (invoked) cpptools/getDocumentSymbols: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 153)
Update IntelliSense time (sec): 0.138
LSP: Sending response (id: 153)
LSP: (received) textDocument/documentHighlight: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 154)
LSP: (invoked) textDocument/documentHighlight: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 154)
LSP: Sending response (id: 154)
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (invoked) cpptools/didChangeTextEditorSelection
LSP: (received) cpptools/getFoldingRanges: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 155)
LSP: (invoked) cpptools/getFoldingRanges: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 155)
LSP: Sending response (id: 155)
LSP: (received) cpptools/getDocumentSymbols: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 156)
LSP: (invoked) cpptools/getDocumentSymbols: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 156)
LSP: Sending response (id: 156)
LSP: (received) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 157)
LSP: (invoked) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 157)
LSP: Sending response (id: 157)
LSP: (received) textDocument/hover: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 158)
LSP: (invoked) textDocument/hover: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 158)
LSP: Sending response (id: 158)
LSP: (received) textDocument/hover: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 159)
LSP: (invoked) textDocument/hover: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 159)
LSP: Sending response (id: 159)
LSP: (received) textDocument/hover: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 160)
LSP: (invoked) textDocument/hover: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 160)
LSP: Sending response (id: 160)
LSP: (received) textDocument/documentHighlight: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 161)
LSP: (invoked) textDocument/documentHighlight: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 161)
LSP: Sending response (id: 161)
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (invoked) cpptools/didChangeTextEditorSelection
LSP: (received) textDocument/hover: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 162)
LSP: (invoked) textDocument/hover: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 162)
LSP: Sending response (id: 162)
LSP: (received) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 163)
LSP: (received) textDocument/definition: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 164)
LSP: (invoked) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 163)
LSP: Sending response (id: 163)
LSP: (invoked) textDocument/definition: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 164)
LSP: Sending response (id: 164)
LSP: (received) cpptools/queryTranslationUnitSource: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk/state.h (id: 165)
LSP: (invoked) cpptools/queryTranslationUnitSource: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk/state.h (id: 165)
LSP: Sending response (id: 165)
LSP: (received) textDocument/didOpen: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk/state.h
LSP: (invoked) textDocument/didOpen: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk/state.h
LSP: (received) textDocument/didClose: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk/state.h
LSP: (invoked) textDocument/didClose: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk/state.h
LSP: (received) cpptools/formatDocument: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 166)
LSP: (invoked) cpptools/formatDocument: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 166)
Formatting document: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: (received) textDocument/definition: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 167)
Formatting Engine: clangFormat
/home/yhxiang/.vscode-server/extensions/ms-vscode.cpptools-1.20.5-linux-x64/bin/../LLVM/bin/clang-format '-style={ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Allman, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All, FixNamespaceComments: false }' -fallback-style=LLVM -sort-includes=0 --Wno-error=unknown -assume-filename=/home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: Sending response (id: 166)
LSP: (invoked) textDocument/definition: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 167)
LSP: (received) textDocument/willSaveWaitUntil: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 168)
LSP: (invoked) textDocument/willSaveWaitUntil: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 168)
LSP: Sending response (id: 168)
willSaveWaitUntil: 0ms
LSP: (received) cpptools/fileChanged: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: Sending response (id: 167)
LSP: (invoked) cpptools/fileChanged: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: (received) textDocument/didSave: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: (invoked) textDocument/didSave: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
Intellisense update pending for: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
  tag parsing file: /home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: (received) cpptools/queryTranslationUnitSource: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk/state.h (id: 169)
LSP: (invoked) cpptools/queryTranslationUnitSource: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk/state.h (id: 169)
LSP: Sending response (id: 169)
LSP: (received) textDocument/didOpen: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk/state.h
LSP: (invoked) textDocument/didOpen: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk/state.h
LSP: (received) textDocument/didClose: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk/state.h
LSP: (invoked) textDocument/didClose: file:///home/yhxiang/repos/quantdev/desk2/common/include/desk/state.h
IntelliSense update scheduled and TU acquisition started for: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
Update IntelliSense time (sec): 0.755
LSP: (received) cpptools/getFoldingRanges: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 170)
LSP: (invoked) cpptools/getFoldingRanges: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 170)
LSP: Sending response (id: 170)
LSP: (received) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 171)
LSP: (invoked) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 171)
LSP: Sending response (id: 171)
LSP: (received) cpptools/getDocumentSymbols: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 172)
LSP: (invoked) cpptools/getDocumentSymbols: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 172)
LSP: Sending response (id: 172)
Database safe to open.
LSP: (received) cpptools/getDiagnostics (id: 173)
LSP: (invoked) cpptools/getDiagnostics (id: 173)
LSP: Sending response (id: 173)
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeActiveEditor: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: (invoked) cpptools/didChangeActiveEditor: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 174)
LSP: (invoked) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 174)
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: Sending response (id: 174)
LSP: (invoked) cpptools/didChangeVisibleTextEditors
Intellisense update pending for: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: (received) cpptools/didChangeActiveEditor: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: (received) cpptools/didChangeTextEditorSelection
LSP: (received) textDocument/documentHighlight: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 175)
LSP: (invoked) cpptools/didChangeActiveEditor: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
LSP: (invoked) cpptools/didChangeTextEditorSelection
LSP: (invoked) textDocument/documentHighlight: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 175)
LSP: Sending response (id: 175)
IntelliSense update scheduled and TU acquisition started for: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp
Update IntelliSense time (sec): 0.016
LSP: (received) cpptools/getFoldingRanges: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 176)
LSP: (invoked) cpptools/getFoldingRanges: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 176)
LSP: Sending response (id: 176)
LSP: (received) cpptools/getFoldingRanges: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 177)
LSP: (invoked) cpptools/getFoldingRanges: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 177)
LSP: Sending response (id: 177)
LSP: (received) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 178)
LSP: (invoked) cpptools/getCodeActions: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 178)
LSP: Sending response (id: 178)
LSP: (received) cpptools/getDocumentSymbols: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 179)
LSP: (invoked) cpptools/getDocumentSymbols: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 179)
LSP: Sending response (id: 179)
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) textDocument/documentHighlight: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 180)
LSP: (invoked) textDocument/documentHighlight: file:///home/yhxiang/repos/quantdev/desk2/dfcf/src/system.cpp (id: 180)
LSP: Sending response (id: 180)
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors



### Other Extensions

_No response_

### Additional context

_No response_

I found that the problem comes from this signature:

    template <unsigned int SIZE>
    inline auto fill(char (&dst)[SIZE], std::convertible_to<std::string_view> auto &&src) -> void

When I move std::convertible_to<std::string_view> auto to a template parameter:

    template <unsigned int SIZE, std::convertible_to<std::string_view> T>
    inline auto fill(char (&dst)[SIZE], T &&src) -> void

The errors disappeared