JetBrains Rider 2020.2 Help

Code Completion

File | Settings | Languages and Frameworks | C++ | Code Completion

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

Show free functions in members completion

One common C++ coding practice is to prefer non-member non-friend functions to member functions. This is a great way to increase encapsulation and keep class interfaces as minimal as possible. When you type a dot . or an arrow -> after an expression, free functions that accept the expression as the first parameter will be suggested in the completion list after member functions:

ReSharper C++: Free functions in code completion

You can clear this checkbox if you do not want to have free functions in the completion suggestions.

Show import items in basic completion

When a symbol that you want to use is not imported in the current file with the corresponding #include, but it is defined in the standard libraries or elsewhere in your solution, you can press Ctrl+Alt+Space to quickly find this symbol in completion suggestions:

JetBrains Rider: Import symbol completion in C++
You can use this option to include import symbol suggestions into the suggestion lists of automatic and basic completion. Note that this comes with a performance hit (since each time when JetBrains Rider builds a completion list, it has to look at all the symbols in the solution to match them), so it is disabled by default.

Behavior of import items

Configure the import completion behavior to always insert an include directive or show a menu with an option to add a forward declaration.

Last modified: 27 August 2020