Closed
Description
Checklist
- [ X ] This problem exists even with the setting
"C_Cpp.enhancedColorization": "Disabled"
If Disabling that^ makes the problem go away, then follow this to make an issue on the C++ extension:
https://github.com/microsoft/vscode-cpptools/issues/new/choose
The code with a problem is:
#include "MyAwesomeDatabaseLibrary.h"
#include <string>
#include <iostream>
int main(int argc, char** argv)
{
std::string plate = argv[1];
AwesomeDBConnection conn;
conn.Open("myconnectionstring");
auto query = conn.Execute(R"sql(
SELECT uid, part_name, install_date FROM CarParts
WHERE plate = ')sql" + plate + "' ORDER BY install_date");
for (const auto& entry : query)
{
std::cout << entry["uid"] << ": ";
std::cout << entry["part_name"] << ", ";
std::cout << entry["install_date"] << std::endl;
}
conn.Close();
return 0;
}
It looks like:

It should look like:
(Well, not like that :D - after finding the first quote character in the raw C++ string, somehow, the process's interpretation of what is
a token and what is the inside of a string, gets reversed. It is as if raw strings are not correctly interpreted here.
Metadata
Metadata
Assignees
Labels
No labels