Compiler Error C3457

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C3457.

attribute': attribute does not support unnamed arguments

Source annotation attributes, unlike CLR custom attribute or compiler attributes, only support named arguments.

The following sample generates C3457.

#include "SourceAnnotations.h"  
[vc_attributes::Post( 1 )] int f();   // C3457  
[vc_attributes::Post( Valid=vc_attributes::Yes )] int f2();   // OK  

Show: