ReSharper by Language: C++
C++ support includes C, C++03, C++11, C++14, C++17, C++/CLI, and partially C++20. ATL, MFC and COM projects are supported. ReSharper detects C++ version automatically based on the platform toolset (General | Platform Toolset in the project properties) and/or on the /std switch.
tip
You can disable ReSharper features in C++ files by clearing the ReSharper C++ checkbox on the Environment | Products & Features page of ReSharper options(Alt+R, O).
In this section:
- Code Inspection and Quick-Fixes
- Coding Assistance
- Code Style Assistance
- Clang-Tidy Integration
- Using Clang-Format
- Debugging Assistance
- Navigation and Search
- Inlay Hints
- Analysis of Includes
- Refactorings
- Code Templates
- Code Generation
- Unit Testing Assistance
- C++/CLI Support
Unsupported and partly supported language constructs
Unsupported C++11 features:
Lambda functions are partially supported
Partially supported C++11 features:
Unsupported extensions:
C++/CX
Unsupported MS C++ extensions:
A new line immediately preceded by a backslash inside identifiers, keywords and numeric literals
When resolving names used in templates, all names are treated as dependent names
Partially supported MS C++ extensions:
Unsupported MS preprocessor extensions:
Disabling ReSharper's code analysis engine with the __RESHARPER__ macro
If some C++ construct is not supported by ReSharper's code analysis engine or parsed incorrectly, you can disable ReSharper for this code with the __RESHARPER__
macro, i.e:
#ifndef __RESHARPER__
// This code will not be visible to ReSharper
#endif
Make ReSharper ignore specific code
ReSharper allows you to ignore specific files, folders and file masks in different ways. You can configure ignored files on the following options pages:
Code Inspection | Ignored Code to exclude files, folders, and masks from code inspection.
Code Inspection | Generated Code to partly disable code inspection for generated code.
Environment | Search & Navigation to specify files and folders that should be ignored by Search by Name commands.
Code Editing | Third-Party Code to add C++, JavaScript, TypeScript, CSS, HTML and JSON files, folders and wildcards to be treated either as 'skipped' or 'library'. ReSharper will completely ignore 'skipped' files, and treat 'library' files as read-only — indexed for navigation, but no inspections, quick-fixes and refactorings.