I am working on a project in C++14, and am having issues getting Intellisense to recognize that my syntax is C++14. I am getting errors like:
Even though when I compile with -std=c++14, it works.
EDIT: The variable name is Replica, as is the class. This compiles in C++14. Here is the declaration of variable:
Replica Replica(repID, true, false, false, reader, io_context);
EDIT: My apologies, I had changed the above line from:
replica replica(repID, true, false, false, reader, io_context);
and did not realize that this is not allowed in C++14. My apologies, I think the Intellisense is working and this question should be closed.
I have read the post here: vscode Intellisense not working and I think I have tried everything from the top answers.
This is what my c_cpp_properties.json
looks like:
{
"configurations": [
{
"name": "Mac",
"includePath": [
"/usr/local/include",
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include",
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
"/usr/local/Cellar/boost/1.76.0/include/boost/predef/other"
],
"defines": [],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1",
"/usr/local/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"macFrameworkPath": [
"/System/Library/Frameworks",
"/Library/Frameworks"
],
"compilerPath": "/usr/bin/g++",
"cStandard": "c11",
"cppStandard": "c++14",
"compilerArgs": [
"-std=c++14"
]
}
],
"version": 4
}
Please let me know if I should upload more information.