_DEPRECATED_ATTRIBUTE0 and _DEPRECATED_ATTRIBUTE1

From RAD Studio
Jump to: navigation, search

Go Up to sysmac.h Index

The _DEPRECATED_ATTRIBUTE0 and _DEPRECATED_ATTRIBUTE1 macros can be used as an alternative to the [[deprecated]] C++ attribute. These two macros have the same effect as the [[deprecated]] C++ attribute, except that, in case the [[deprecated]] attribute is not supported, no warning or error is issued (_DEPRECATED_ATTRIBUTE0 and _DEPRECATED_ATTRIBUTE1 can be defined to be empty).

_DEPRECATED_ATTRIBUTE0
Represents the [[deprecated]] attribute with no comment or parameter.
_DEPRECATED_ATTRIBUTE1(x)
Represents the [[deprecated]] attribute with one comment or parameter, typically a comment (x) about the deprecation.

Warning: If you are using C++ Audits in the XE2 release, your code will fail if you specify the [[deprecated]] attribute. The underlying parser used by the C++ Audits feature does not support the [[deprecated]] attribute. Instead, you should use the _DEPRECATED_ATTRIBUTE0 and _DEPRECATED_ATTRIBUTE1 macros. For code that will not be audited, you can use either the C++11 attribute or the predefined macros.

See Also