libvpb
4.2.61
|
Deprecated symbol handling. More...
Macros | |
#define | VT_COMPILER_GCC(major, minor) 0 |
Compiler version test. More... | |
Code deprecating macros | |
Use these macros to mark deprecated code if you wish to generate compile time warnings about its continued use. | |
#define | VT_DEPRECATED(x) |
Macro wrapper for deprecated symbols. More... | |
#define | VT_DEPRECATED_MACRO |
Helper for deprecated macros. More... | |
Functions | |
Macro-deprecating helper | |
Deprecated::VT_DEPRECATED (typedef int Macro) | |
Parasitic type used to generate VT_DEPRECATED_MACRO warnings. | |
Deprecated symbol handling.
#define VT_COMPILER_GCC | ( | major, | |
minor | |||
) | 0 |
Compiler version test.
This macro will return false if the version of gcc in use is earlier than the specified major, minor limit, or if gcc is not being used. Otherwise it will evaluate to be true.
#define VT_DEPRECATED | ( | x | ) |
Macro wrapper for deprecated symbols.
You can use this macro to generate compile time warnings for deprecated functions and methods, variables, and types, by simply wrapping an existing declaration with it or creating one that matches the existing definition. You cannot wrap definitions or implicitly inline methods with it, a separate declaration must exist.
x | The symbol declaration to deprecate. |
For example:
#define VT_DEPRECATED_MACRO |
Helper for deprecated macros.
Include this macro somewhere harmless (eg. hidden in a comma operator or empty statement) in a macro definition to get compile time warnings about its continued use.
For example: