ReSharper 2026.1 Help

Predefined Surround Templates for C++

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

Template

Details

()

Scope C/C++ expressions, C# 2.0+

Body

($SELECTION$$END$)

Parameters

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

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

{}

Scope C/C++ statements, C# 2.0+

Body

{ $SELECTION$$END$ }

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.

06 March 2026