description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||
---|---|---|---|---|---|---|---|
Learn more about: Compiler Error C3533 | Compiler Error C3533 | 11/04/2016 |
|
| a68b1ba5-466e-4190-a1a4-505ccfe548b7 |
'type': a parameter cannot have a type that contains 'auto'
A method or template parameter cannot be declared with the auto
keyword if the default /Zc:auto compiler option is in effect.
- Remove the
auto
keyword from the parameter declaration.
The following example yields C3533 because it declares a function parameter with the auto
keyword and it is compiled with /Zc:auto.
// C3533a.cpp// Compile with /Zc:autovoidf(auto j) {} // C3533
The following example yields C3533 in C++14 mode because it declares a template parameter with the auto
keyword and it is compiled with /Zc:auto. (In C++17, this is a valid definition of a class template with a single non-type template parameter whose type is deduced.)
// C3533b.cpp// Compile with /Zc:autotemplate<auto T> classC {}; // C3533