Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Compiler Error C3539

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see Compiler Error C3539 on docs.microsoft.com. 'type': a template-argument cannot be a type that contains 'auto'

The indicated template argument type cannot contain a usage of the auto keyword.

To correct this error

  1. Do not specify the template argument with the auto keyword.

The following example yields C3539.

// C3539.cpp  
// Compile with /Zc:auto  
template<class T> class C{};  
int main()  
{  
   C<auto> c;   // C3539  
   return 0;  
}  

auto Keyword

Show:
© 2017 Microsoft