Error del compilador C3541

"type": no se puede aplicar typeid a un tipo que contiene "auto"

El operador typeid no se puede aplicar al tipo indicado porque contiene el especificador auto.

Ejemplo

En el ejemplo siguiente, se produce el error C3541.

// C3541.cpp
// Compile with /Zc:auto
#include <typeinfo>
int main() {
    auto x = 123;
    typeid(x);    // OK
    typeid(auto); // C3541
    return 0;
}

Consulte también

Auto (palabra clave)
/Zc:auto (Deducir tipo de variable)
typeid