mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0027113: Coding - add macros Standard_DEPRECATED for marking deprecated functionality
Macro Standard_DEPRECATED("message") can be used in declarations to mark a method deprecated and generate compiler warning when it is used. If OCCT_NO_DEPRECATED is defined, Standard_DEPRECATED is disabled (defined empty).
This commit is contained in:
parent
84eca96b9d
commit
8ddd25b887
@ -29,6 +29,22 @@
|
|||||||
#define Standard_OVERRIDE
|
#define Standard_OVERRIDE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Macro Standard_DEPRECATED("message") can be used to declare a method deprecated.
|
||||||
|
// If OCCT_NO_DEPRECATED is defined, Standard_DEPRECATED is defined empty.
|
||||||
|
#ifdef OCCT_NO_DEPRECATED
|
||||||
|
#define Standard_DEPRECATED(theMsg)
|
||||||
|
#else
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#define Standard_DEPRECATED(theMsg) __declspec(deprecated(theMsg))
|
||||||
|
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) || defined(__clang__))
|
||||||
|
#define Standard_DEPRECATED(theMsg) __attribute__((deprecated(theMsg)))
|
||||||
|
#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
|
||||||
|
#define Standard_DEPRECATED(theMsg) __attribute__((deprecated))
|
||||||
|
#else
|
||||||
|
#define Standard_DEPRECATED(theMsg)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
//======================================================
|
//======================================================
|
||||||
// Windows-specific definitions
|
// Windows-specific definitions
|
||||||
//======================================================
|
//======================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user