Kompilatorfel C3540

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

Anmärkningar

Operatorns storlek kan inte tillämpas på den angivna typen eftersom den innehåller auto specificeraren.

Example

Följande exempel ger C3540.

// C3540.cpp
// Compile with /Zc:auto
int main() {
    auto x = 123;
    sizeof(x);    // OK
    sizeof(auto); // C3540
    return 0;
}

Se även

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