cannot always surrounda code as expected, specifically currly brackets

Ive just started my evaluation of resharper c++ and find one of my, if not the most used, feature not workin.

 

I am unable to surround a block of code with curry brackets in some situations and it doesnt make sense.

This is something i do quite often.

 

Lets say i have this code , simple for brevity:

const auto l = 1;
while (true)
{

}

 

I then want to add an if statement and wrap  the original code.

if (true)

const auto l = 1;
while (true)
{

}

Selecting the original code, i cannot then apply surround with currly brackets...

 

Oddly remove the line

const auto l = 1;



It is now possible to do it with this:



if (true)

while (true)
{

}

 

Maddening

1 comment
Comment actions Permalink

Hello!

Thanks for the feedback. This is a known issue - please vote for https://youtrack.jetbrains.com/issue/RSCPP-23060.

The easiest way to wrap a block of code in a control flow statement is to use a live template - just start typing the template's name with selection active and complete with Tab:

0

Please sign in to leave a comment.