Questions tagged [resharper-c++]

ReSharper C++ is a productivity tool extension for C++ development in Microsoft Visual Studio.

ReSharper C++ is a productivity tool for Visual Studio which brings refactorings, navigation, code inspections, quick-fixes, and code generation to the C++ world like ReSharper for C#.

19 questions
16
votes
4 answers

How are ReSharper C++ and Visual Assist different?

What's different between the two? JetBrains lists some differences here, but I heard there might be some inaccuracies in the list.
Filip Skakun
  • 31,624
  • 6
  • 74
  • 100
8
votes
8 answers

Do not use array subscript when the index is not an integer constant expression; use gsl::at() instead

I was trying to create some example code in Microsoft Visual Studio which looks like that int main() { const size_t size = 10; int arr[size]; for (size_t i = 0; i < size; ++i) arr[i] = i; return 0; } Now JetBrains…
user4290866
8
votes
1 answer

Messed up color scheme in ReSharper C++

After upgrading to the latest ReSharper Ultimate version, my VS color scheme is kinda messed up. i have tried re-installing it, deleting the VC12_Config key from the registry and modify the "extensions changed file". If I suspend ReSharper my color…
5
votes
1 answer

Can Intellisense in Visual Studio 2017 suggest C++ headers to include?

Coming from a primarily C# background, I used ReSharper for many years. Being able to place my cursor on an unresolved reference, hit Alt+Enter, and select an option to add the appropriate using statement was invaluable. Now, Visual Studio 2017 has…
5
votes
2 answers

Binding r-value to l-value reference is non-standard Microsoft C++ extension

I've been working on a project recently, and I decided to install ReSharper C++ to Visual Studio. When it analysed my code it spat out a bunch of new warnings (apparently I have bad coding habits..). One of them that took me a while to figure out…
brads3290
  • 1,926
  • 1
  • 14
  • 20
2
votes
1 answer

ResharperC++ suggests to make method const

ResharperC++ suggests to make a class method const even if in the method the data is accessed through members. I know this is legal to make them const, but I was wondering if it is possible to disable this suggestion somehow or even better reverse…
user4290866
2
votes
1 answer

Additional keyword syntax highlighting (for ReSharper C++)

I'm trying to use a new keyword (await), but ReSharper C++ marks it in red, and it really stands out and annoying. I've tried to disable the color highlighting, but it still shows up in red. Completely suspending ReSharper or disabling Code Analysis…
tina nyaa
  • 991
  • 4
  • 13
  • 25
1
vote
1 answer

Can I get ReSharper to generate "overrides" for non-virtual functions?

I know it's not overriding, but I don't know if there's a name for "shadowing" parent functions in child classes. (If there is please tell me) Example: class Foo { public: void fn(std::string s); }; class Bar : public Foo { public: void…
1
vote
1 answer

ReSharper C++ dotSettings file for popular coding standards

Are there any ReSharper .dotSettings files available for popular coding standards (e.g. Google C++ Style Guide or C++ Coding Standards: 101 Rules, Guidelines, and Best Practices)? I'm a bit surprised that I can't seem to find any of these. I would…
Roel
  • 329
  • 1
  • 4
  • 14
1
vote
2 answers

How do I declare a Qt signal so Resharper doesn't give me a warning?

If I have a class that declares a Qt signal: class Test { signals: void TestSignal(); } This works fine in Qt. But Resharper C++ gives me the warning: Function 'void Test::TestSignal()' is not implemented This is correct but pointless since…
parsley72
  • 8,449
  • 8
  • 65
  • 98
1
vote
1 answer

Resharper C++ Lambda Braces Indentation

I am using Resharper C++. I have code that often uses lambdas as function parameters, and I want them aligned as such: return Method( [&]() -> bool { return this.variable >= 0; }, "a normal parameter"); i.e. I want all…
Thomas Flinkow
  • 4,845
  • 5
  • 29
  • 65
1
vote
1 answer

Refactor function from non-inline to inline

Is there any command in Resharper for c++ (or maybe in Visual Studio itself) to make non-inline function as inline? For example I have function Foo declared in Foos.h and defined in Foos.cpp. Now I wanna have it's defined in Foos.h, i.e. exactly…
pkuderov
  • 3,501
  • 2
  • 28
  • 46
0
votes
0 answers

Resharper formatting issue: if() statement in VS2022 C++ code

I'm working on vs2022 with resharper. And there is a problem with me editing the if() in a {}. float example (){ if() } the moment i tapped the () after if, resharper format the code like this: float example (){ if () } How can i disable this…
0
votes
0 answers

C++ type is incomplete, can't access methods and fields, can't include

I have a problem with C++ project. I'm using resharper c++ for visual studio 2017 if thats relevant. When I have 2 classes (A, B) and they include each other, sometimes resharper blacks out #include "A.h" in B as it would be unused, even if I have…
spiral
  • 381
  • 1
  • 3
  • 6
0
votes
1 answer

Resharper : subtituate macro with multi-line code

Is it possible to make Resharper Substituate macro call in separate-lines mode? Example I have this code :- #define TEST(T) int T=5; \ T++; TEST(apple); If I click Substituate macro call and all nested calls like this :- The line TEST(apple);…
javaLover
  • 6,347
  • 2
  • 22
  • 67
1
2