नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'type': a parameter cannot have a type that contains 'auto'
Remarks
A method or template parameter cannot be declared with the auto keyword if the default /Zc:auto compiler option is in effect.
To correct this error
- Remove the
autokeyword from the parameter declaration.
Examples
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:auto
void f(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:auto
template<auto T> class C {}; // C3533