ReSharper 2024.3 Help

Code Generation

ReSharper options: Code Editing | C/C++ | Code Generation

On this page, you can adjust the way code generation works in C++.

Bodies of generated functions

Default function body

Specify whether the generated functions should have an empty body, return a default value, throw an std::logic_error, or include uncompilable code.

Body of empty constructors and destructors

Specify whether the generated constructors and destructors should have defaulted bodies, empty bodies, or be without bodies.

Call the overridden function from the body of an overriding function

Use this setting to automatically call the base function. In the Unreal Engine project, ReSharper will call the overridden function from the generated body of an overriding function using the idiomatic Super type alias.

Generate default operator implementation

This setting allows you to generate idiomatic bodies of operator functions that are usually implemented in terms of the associated operator.

Documentation comment template

Use the 'doc' live template (edit in ReSharper | Tools | Template Explorer)

If necessary, you can customize the comment stub by editing the doc live template that ReSharper uses for generation.

Use the default template

Configure the following settings to adjust the default comment stub:

  • Comment style: choose /**, /*!, ///, or //! as the preferred comment style.

  • Template: choose Doxygen or XML style for documentation comments.

  • Tag prefix: choose @param or \param as the preferred tag prefix.

  • Add the @brief tag: select this checkbox to enable the @brief tag in doxygen-style comments.

Other options

Declare converting constructors 'explicit'

With this checkbox selected, when you generate code from usage, converting constructors will be declared explicit.

Keep default arguments when generating an overriding function

This option lets you control whether code generation actions should preserve default function arguments when creating overriding functions.

Last modified: 14 November 2024