-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Milestone
Description
Type: LanguageService
Describe the bug
- OS and Version: Windows 10 18362
- VS Code Version: 1.41.1
- C/C++ Extension Version: 0.26.3
- I have CMake tools installed
To Reproduce
- Write
auto array = std::array<int, 4>{};
array = [&array]{ return std::array<int, array.size()>{}; }();
- Intellisense will say "Expression must have constant value --
*this
cannot be used as constant value"
(For some reason my Intellisense won't give error messages in English, that error message above is translated from Chinese "表达式必须含有常量值 --*this
的值不能用作常数")
Expected behavior
This shouldn't be flagged as an error since it's valid:
Screenshots
Additional context
Cpp Properties:
{
"compilerPath": "C:/MyMinGW/i686-9.2.0-static-release-win32-dwarf-rt_v6/mingw32/bin/gcc.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"configurationProvider": "vector-of-bool.cmake-tools",
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
aandrejevas