Skip to content

Commit a1d21cf

Browse files
CaseyCarterColin Robertson
authored andcommitted
Update compiler-error-c3533.md (MicrosoftDocs#246)
Fix number typos in the text, and clarify that the second example is a valid template definition in C++17.
1 parent 0250b1b commit a1d21cf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/error-messages/compiler-errors-2/compiler-error-c3533.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ ms.workload: ["cplusplus"]
2222
1. Remove the `auto` keyword from the parameter declaration.
2323

2424
## Example
25-
The following example yields C3535 because it declares a function parameter with the `auto` keyword and it is compiled with **/Zc:auto**.
25+
The following example yields C3533 because it declares a function parameter with the `auto` keyword and it is compiled with **/Zc:auto**.
2626

2727
```
2828
// C3533a.cpp
2929
// Compile with /Zc:auto
30-
void f(auto j){} // C3533
30+
void f(auto j) {} // C3533
3131
```
3232

3333
## Example
34-
The following example yields C3535 because it declares a template parameter with the `auto` keyword and it is compiled with **/Zc:auto**.
34+
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.)
3535

3636
```
3737
// C3533b.cpp
3838
// Compile with /Zc:auto
39-
template<auto T> class C{}; // C3533
39+
template<auto T> class C {}; // C3533
4040
```
4141

4242
## See Also
4343
[auto Keyword](../../cpp/auto-keyword.md)
44-
[/Zc:auto (Deduce Variable Type)](../../build/reference/zc-auto-deduce-variable-type.md)
44+
[/Zc:auto (Deduce Variable Type)](../../build/reference/zc-auto-deduce-variable-type.md)

0 commit comments

Comments
 (0)