Skip to content

<typeinfo> must be included before typeid is used #1067

@hypermagik

Description

@hypermagik

The following piece of code shows this error, even though typeinfo is included:

#include <typeinfo>

int main() {
    const std::type_info &ti = typeid(main);
    return 0;
}
file: 'file:///.../test.cpp'
severity: 'Error'
message: '<typeinfo> must be included before typeid is used'
at: '4,32'
source: ''

Operating System and version: Ubuntu 16.04.3 LTS.

VS Code version and if you are using the Insiders build: 1.16.1 (not Insiders build).

C/C++ extension version: 0.13.0.

Other extensions you installed and if the issue persists after disabling them: issue persists after disabling all other extensions.

Relevant settings from your settings.json, c_cpp_properties.json, and/or launch.json files:
"C_Cpp.intelliSenseEngine": "Default".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.

    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