Skip to content

Latest commit

 

History

History
57 lines (54 loc) · 2.36 KB

File metadata and controls

57 lines (54 loc) · 2.36 KB
title Attributes by Usage | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic index-page
dev_langs
C++
helpviewer_keywords
attributes [C++]
ms.assetid 8be2de10-b1ff-4ca4-a114-75318408593c
caps.latest.revision 8
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

Attributes by Usage

This topic lists attributes according to the C++ language elements to which they apply.

If an attribute precedes a Visual C++ element that is not in the attribute's scope, the attribute block is treated as a comment.

Attribute Description
Module Attributes Applies to the module attribute.
Interface Attributes Applies to the __interface C++ keyword.
Class Attributes Applies to the C++ keyword.
Method Attributes Applies to the methods in a class, coclass, or interface.
Parameter Attributes Applies to parameters of a method in a class or interface.
Data Member Attributes Applies to the data members in a class, coclass, or interface.
Typedef, Enum, Union, and Struct Attributes Applies to the C++ keywords.
Array Attributes Applies to arrays or SAFEARRAYs.
Stand-Alone Attributes Operates more like a line of code but does not operate on a C++ keyword. Stand-alone attribute statements require a semicolon at the end of the line.
Custom Attributes Allows the user to extend metadata.

See Also

C++ Attributes Reference
Concepts
Attributes by Group
Attributes Alphabetical Reference