ReSharper 2020.2 Help

Context Actions for C++

ReSharper provides the following context actions for Cpp:

NameDescription
Add '= default' specifier to a function without definitionMarks a function without definition as defaulted.
Add '= delete' specifier to a function without definitionMarks a function without definition as deleted.
Add pure specifier to a virtual function without definitionMarks a virtual function without definition with a pure specifier.
Add 'virtual' specifier to a virtual member functionAdds 'virtual' specifier to a virtual member function.
Convert #include directive from angle-bracket to quoted formConvert #include directive from angle-bracket to quoted form.
Convert #include directive from quoted to angle-bracket formConvert #include directive quoted to angle-bracket form.
Convert '?:' expression to 'if' statementConverts a ternary conditional operator to an equivalent 'if' statement.
Convert a typedef declaration into an alias declarationReplaces a typedef declaration with an equivalent alias declaration.
Convert an alias declaration into a typedef declarationReplaces an alias declaration with an equivalent typedef declaration.
Convert an enum to a stringCreates a function from a template that converts an enum to a string.
For more information, see Convert enum to string (generate enum-to-string helper).
Convert 'if' statement to '?:' expressionConverts an 'if' statement to an equivalent ternary conditional operator.
Convert to nested namespace definitionReplaces a series of nested namespaces with a single namespace using the nested namespace definition syntax.
Convert to regular return typeConverts a trailing return type into a regular return type in a function declaration.
Convert to trailing return typeConverts a regular return type into a trailing return type in a function declaration.
Create derived classCreates a derived class.
Create derived interfaceCreates a derived interface.
Create derived interface classCreates a derived interface class.
Create derived interface structCreates a derived interface struct.
Create derived ref classCreates a derived ref class.
Create derived ref structCreates a derived ref struct.
Create derived structCreates a derived struct.
Document entityGenerate documentation for a function, macro definition, namespace, class, enum, typedef, alias declaration, global variable or a class member from a template.
Flip operator argumentsFlips left and right operands for selected operator, e.g. '0 == i' to 'i == 0'.
Flip relational operatorFlips operands of binary relational operators.
Format compound statementFormats the compound statement under the caret.
Generate case-stubsGenerates missing case statements for the given switch statement.
For more information, see Generate missing case statements.
Generate constructorGenerate constructor.
Generate definitions by declarationsGenerate definitions by declarations.
Generate implementation by declarationGenerate implementation by declaration.
Generate inline implementationGenerate inline implementation.
Generate missing membersGenerate missing members.
Generate mock methodsGenerate mock methods.
Generate overriding membersGenerate overriding members.
Initialize field from constructor parameterInitializes field from constructor parameter.
Invert 'if' statementInverts guard condition of an 'if' statement and swaps the branches' code accordingly.
Join declarationsJoins several declarations into a declaration with multiple declarators.
Make member initializer a default member initializerMoves member initializer from member initializer list to default member initializer.
Merge nested 'if' statementsMerges two nested 'if' statements to a single 'if' statement that checks conjunction of the original conditions.
Move function implementation out of class scopeMoves function implementation out of class scope.
For more information, see Move implementation out of class scope.
Move function implementation to source fileMoves function implementation to a source file.
Move function implementationsMove function implementations.
Negate logical expressionNegates logical expression.
Remove bracesRemoves unnecessary braces around one or more statements in the code.
Replace 'auto' with explicit type declarationReplaces 'auto' with explicit type declaration.
Replace decltypeReplace decltype with the underlying type.
Replace 'decltype(auto)' with explicit type declarationReplaces 'decltype(auto)' with explicit type declaration.
Replace UNREFERENCED_PARAMETER to [[maybe_unused]]Replace macro UNREFERENCED_PARAMETER to attribute [[maybe_unused]].
Sort #include directivesSort #include directives
Specify template arguments explicitlySpecifies template arguments explicitly.
Split declaration with multiple declaratorsSplits declaration containing multiple declarators into multiple declarations.
Substitute macro callSubstitute macro call.
Substitute macro call with all nested callsSubstitute macro call with all nested calls.
Substitute template type aliasReplace template type alias with the underlying type.
Substitute typedefReplace typedef with the underlying type.
Substitute typedef and all nested typedefsReplace typedef and all nested typedefs with the underlying type.
Switch between typename and class keywordsReplaces typename with class and vice versa in template parameter definition.
Last modified: 05 August 2020