简体   繁体   中英

Visual Studio 2019 doesn't display the complete list of class methods

After update to Visual Studio 2019 I had seen the problem. In context menu(when I write. or -> after class object) with list of class methods I don't see all methods. But I can manually write name of method and it's ok. For example, std::shared_ptr hasn't method get() in context menu, but I can write of the method manually. Why Visual Studio doesn't display all methods?

  • First ensure that your code do compile. If you have errors before in your file (or included headers) like an extra }, IntelliSense might not works.
  • If you open large solution or do a lot of change, it can take some time before the IntelliSense database get up-to-date.
  • If you always have the same problem, then make a project that reproduce the problem and report it to Microsoft using Report problem tool. Complaining here won't help improve Visual Studio.
  • Also ensure that you explicitly include appropriate headers and see if it fix the problem.

While I don't use sdt::shared_ptr often, I have no problem seeing the get() method for std::unique_ptr .

Obviously, if you use -> operator, the target class should not be an imcomplete type for IntelliSense to works.

Presently, IntelliSense is limited with function like std::make_unique as it seems to only look top level declaration and as such is not able to figure out available constructors.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM