Kompilatorfel C3541

"type": typeid kan inte tillämpas på en typ som innehåller "auto"

Anmärkningar

Typeid-operatorn kan inte tillämpas på den angivna typen eftersom den innehåller auto specificeraren.

Example

Följande exempel ger C3541.

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

Se även

automatiskt nyckelord
/Zc:auto (Härled typ)
typeid