Macro definitions for supported attributes.
More...
#include "cpp_attributes.hpp"
#include "c_attributes.h"
#include "builtin.h"
Go to the source code of this file.
|
|
#define | REXLIB_NORETURN |
| | Indicates that the function does not return.
|
| |
|
#define | REXLIB_FALLTHROUGH |
| | Used to explicitly avoid warnings when a break condition is not desired in a switch statement.
|
| |
|
#define | REXLIB_DEPRECATED(reason) |
| | Indicates that a function is deprecated providing a reason.
|
| |
|
#define | REXLIB_NODISCARD |
| | Indicates that the return value should be used.
|
| |
|
#define | REXLIB_UNUSED |
| | Indicates that a variable is intentionally declared and but unused.
|
| |
|
#define | REXLIB_NODISCARD_MESSAGE(reason) |
| | Indicates that the return value should be used, proving a message.
|
| |
|
#define | REXLIB_NO_UNIQUE_ADDRESS |
| | Indicates that the empty class does not need to have a unique address and instead it can share space with other variables.
|
| |
|
#define | REXLIB_MAY_ALIAS |
| | Declares a type through which objects of any other type may be accessed, as they may through a character type.
|
| |
|
#define | REXLIB_ASSUME(expr) |
| | Assume that a particular expression evaluates to true for compiler optimizations.
|
| |
|
#define | REXLIB_LIKELY |
| | Indicates to the compiler that a particular branch is likely.
|
| |
|
#define | REXLIB_UNLIKELY |
| | Indicates to the compiler that a particular branch is unlikely.
|
| |
Macro definitions for supported attributes.
This file declares a variety of C++ attributes through macros. When an attribute is not supported, first it tries to provide an alternative though compiler intrinsic macros. If no alternative is available, a dummy declaration is provided. This allows the programmer to use the attributes through macro definitions with no compatibility check, and then its declaration will handle the best option available.