Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 897 Bytes

compiler-error-c3541.md

File metadata and controls

35 lines (28 loc) · 897 Bytes
descriptiontitlems.datef1_keywordshelpviewer_keywordsms.assetid
Learn more about: Compiler Error C3541
Compiler Error C3541
11/04/2016
C3541
C3541
252cfd4c-5fd2-415e-a17d-6b0c254350db

Compiler Error C3541

'type': typeid cannot be applied to a type that contains 'auto'

The typeid operator cannot be applied to the indicated type because it contains the auto specifier.

Example

The following example yields C3541.

// C3541.cpp// Compile with /Zc:auto #include<typeinfo>intmain() { auto x = 123; typeid(x); // OKtypeid(auto); // C3541return0; }

See also

auto Keyword
/Zc:auto (Deduce Variable Type)
typeid

close