c++visual-studiointellisenseconstructor-overloading

ShortCut for showing all the constructor overloads in Visual Studio 2022


What is the way to show all the overloads of a constructor in C++ in Visual Studio 2022?

Suppose I have a Rectangle class, and I have 3 overloads for them. When I hover my mouse in any of them, Intellisense shows a box with the current overload and says I have +4 overloads.

Is there a way I can see the other overloads in that box by pushing any shortcut key? In other words, is there any way I can see/skim through all the overloads in that box, rather than going into the code and trying to find out what the other overloads are?

I have tried to use Ctrl+Shift+Space after putting my cursor inside (). That did not work.

image


Solution

  • You can see the overloads of a method/function/constructor by calling it then a list of overloads will appear eg. exmaple and if you lose the focus (and the list disappeared) you can press Ctrl+Shift+Space on windows or ⌘+Shift+Space on mac only to refocus. this works for () and {} but you must put your cursor inside ()/{} as you mentioned in the question.

    Sadly you can't see all the overloads just by move the cursor to the header as in your example but you could instead do something like this (call the constructor and see the list of overloads).