Compiler Error C3540
'type': sizeof cannot be applied to a type that contains 'auto'
The sizeof operator cannot be applied to the indicated type because it contains the auto
specifier.
Example
The following example yields C3540.
// C3540.cpp
// Compile with /Zc:auto
int main() {
auto x = 123;
sizeof(x); // OK
sizeof(auto); // C3540
return 0;
}
See also
auto Keyword
/Zc:auto (Deduce Variable Type)
sizeof Operator
Palaute
https://aka.ms/ContentUserFeedback.
Tulossa pian: Vuoden 2024 aikana poistamme asteittain GitHub Issuesin käytöstä sisällön palautemekanismina ja korvaamme sen uudella palautejärjestelmällä. Lisätietoja on täällä:Lähetä ja näytä palaute kohteelle