Edit

Share via


Compiler Error C3457

'attribute': attribute does not support unnamed arguments

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

Example

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