Open sant123 opened 1 month ago
Bug Summary:
When writing std::string utf8_str = "\u{1F604}"; into a cpp file, the language server says incorrectly formed universal character name C/C++(965) however compilation and execution works fine.
std::string utf8_str = "\u{1F604}";
incorrectly formed universal character name C/C++(965)
Steps to reproduce:
#include <iostream> int main() { std::string utf8_str = "\u{1F604}"; std::cout << "UTF-8 string: " << utf8_str << std::endl; return 0; }
Expected behavior: No error
{ "configurations": [ { "name": "Linux", "includePath": ["${workspaceFolder}/**"], "defines": [], "compilerPath": "/usr/bin/gcc", "cStandard": "c17", "cppStandard": "gnu++17", "intelliSenseMode": "linux-gcc-x64" } ], "version": 4 }
No response
https://en.cppreference.com/w/cpp/language/escape
Note \u{n...} (since C++23) -> code point U+n... (arbitrary number of hexadecimal digits)
\u{n...} (since C++23)
code point U+n... (arbitrary number of hexadecimal digits)
My compiler is using C++17 and works, also tried to change cppStandard to gnu++23 but still persist the error
cppStandard
@sant123 Thanks for reporting this. I've filed a bug against our shared VS parser at https://developercommunity.visualstudio.com/t/C-IntelliSense-incorrectly-reports-err/10674266 .
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
When writing
std::string utf8_str = "\u{1F604}";
into a cpp file, the language server saysincorrectly formed universal character name C/C++(965)
however compilation and execution works fine.Steps to reproduce:
Expected behavior: No error
Configuration and Logs
Other Extensions
No response
Additional context
https://en.cppreference.com/w/cpp/language/escape
Note
\u{n...} (since C++23)
->code point U+n... (arbitrary number of hexadecimal digits)
My compiler is using C++17 and works, also tried to change
cppStandard
to gnu++23 but still persist the error