Skip to content

GCC 8: IntelliSense suggestions don't work in files that contain std::map (anything depending on type_traits) #2328

@Cre3per

Description

@Cre3per

Type: LanguageService

Describe the bug

  • OS and Version: x86_64 Linux 4.17.8-1-ARCH
  • VS Code Version: 1.25.1
  • C/C++ Extension Version: 0.17.7

To Reproduce
Steps to reproduce the behavior:

  1. Create a new file (main.cpp)
  2. Write
#include <map>

int main(void)
{
  // IntelliSense suggestions stop working after writing this line (and saving)
  std::map<int, int> mp{ };
  
  // If IntelliSense is still up, uncomment this loop
  // for (const auto el : mp)
  // {
    
  // }

  return 0;
}

After this, only VSCode suggestions show up
suggestions

Removing the use of std::map and resetting the IntelliSense database fixes the problem until std::map is used the next time.

Relevant part of the log in Debug mode:

Checking for syntax errors: file:///<path>/main.cpp
queue_update_intellisense for files in tu of: <path>/main.cpp
  tag parsing file: <path>/main.cpp
sending 3 changes to server
Failed to read response from server: 18
Database safe to open

Expected behavior
IntelliSense suggestions should keep working

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions