ReSharper 2024.3 Help

Predefined Surround Templates for C++

This topic lists all predefined surround templates for C++ in ReSharper 2024.3. For more information about surround templates, refer to Surround code fragments with templates.

Template

Details

#if...#endif

Code snippet for #if...#endif preprocessor directive

Scope C/C++, At line start

Body

#if $END$ $SELECTION$ #endif

Parameters

  • SELECTION - The text selected by the user before invoking the template.

  • END - The caret position after the template is applied.

include_guard

Include guard surround template

Scope C/C++ top-level declarations, At line start

Body

#ifndef $FILENAME$ #define $FILENAME$ $SELECTION$ #endif // $FILENAME$

Parameters

  • FILENAME - Evaluates to the current file name in uppercase with all non-alphanumeric characters replaced with underscores

  • DATE - Evaluates to file creation date and time of the current file

  • SELECTION - The text selected by the user before invoking the template.

Last modified: 06 November 2024