|
#define | _QI_MACRO_HPP_ |
|
#define | QI_API_DEPRECATED |
| Compiler flags to mark a function as deprecated. It will generate a compiler warning. More...
|
|
#define | QI_API_DEPRECATED_MSG(msg__) |
| Compiler flags to mark a function as deprecated. It will generate a compiler warning. More...
|
|
#define | QI_NORETURN |
| Portable noreturn attribute, used to declare that a function does not return. More...
|
|
#define | QI_HAS_VARIABLE_LENGTH_ARRAY 0 |
| Mark compilers supporting variable length array (VLA) More...
|
|
#define | QI_LIB_API(libname) QI_LIB_API_(BOOST_PP_CAT(libname, _EXPORTS), BOOST_PP_CAT(libname, _STATIC_BUILD)) |
|
#define | QI_LIB_API_(IS_BUILDING_LIB, IS_LIB_STATIC_BUILD) QI_LIB_API_NORMALIZED(_QI_IS_ONE_OR_EMPTY(BOOST_PP_CAT(_ , IS_BUILDING_LIB)), _QI_IS_ONE_OR_EMPTY(BOOST_PP_CAT(_, IS_LIB_STATIC_BUILD))) |
|
#define | QI_IMPORT_API |
| Compiler flags to import a function or a class. More...
|
|
#define | QI_EXPORT_API |
| Compiler flags to export a function or a class. More...
|
|
#define | QI_LIB_API_NORMALIZED(a, b) |
| Each platform must provide a QI_LIB_API_NORMALIZED(isBuilding, isStatic) More...
|
|
#define | QI_COMPILER_WARNING(x) QI_MSG_PRAGMA("Warning: " #x) |
| Generate a compiler warning. More...
|
|
#define | QI_DEPRECATED_HEADER(x) |
| Generate a compiler warning stating a header is deprecated. add a message to explain what user should do. More...
|
|
#define | QI_DEPRECATE_MACRO(name) QI_COMPILER_WARNING(name macro is deprecated.) |
| A macro used to deprecate another macro. Generate a compiler warning when the given macro is used. More...
|
|
#define | QI_DISALLOW_COPY_AND_ASSIGN(type) |
| A macro to disallow copy constructor and operator=. More...
|
|
#define | QI_WARN_UNUSED_RESULT |
| This macro tags a result as unused. More...
|
|
#define | QI_ATTR_UNUSED |
| This macro tags a attribute as unused. More...
|
|
#define | QI_UNUSED(x) |
| This macro tags a parameter as unused. More...
|
|
#define | QI_IGNORE_UNUSED(x) (void)x |
|
#define | QI_UNIQ_DEF_LEVEL2_(A, B) A ## __uniq__ ## B |
|
#define | QI_UNIQ_DEF_LEVEL1_(A, B) QI_UNIQ_DEF_LEVEL2_(A, B) |
|
#define | QI_UNIQ_DEF(A) QI_UNIQ_DEF_LEVEL1_(A, __LINE__) |
| A macro to append the line number of the parent macro usage, to define a function in or a variable and avoid name collision. More...
|
|
#define | QI_NOEXCEPT(cond) BOOST_NOEXCEPT_IF(cond) |
| Specify that a function may throw or not. Do nothing if noexcept is not available. More...
|
|
#define | QI_NOEXCEPT_EXPR(expr) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(expr)) |
| Specify that a function may throw if the given expression may throw. Do nothing if noexcept is not available. More...
|
|
#define | QI_FALLTHROUGH ((void)0) |
| Declares that the current case in a switch falls through the next case. It is mandatory to append a semicolon after this macro. More...
|
|
Various macros for qi. (deprecated, export API, disallow copy, ..) .
* This header file contains various macros for qi.
*
* - import/export symbol (:cpp:macro:`QI_IMPORT_API`,
* :cpp:macro:`QI_EXPORT_API`)
* - mark function and header as deprecated (:cpp:macro:`QI_DEPRECATED_HEADER`,
* :cpp:macro:`QI_API_DEPRECATED`)
* - generate compiler warning (:cpp:macro:`QI_COMPILER_WARNING`)
* - disallow copy and assign (:cpp:macro:`QI_DISALLOW_COPY_AND_ASSIGN`)
*
Definition in file macro.hpp.
#define QI_IGNORE_UNUSED |
( |
|
x | ) |
(void)x |
This macro prevents the compiler from emitting warning when a variable is defined but not used.
Note: You may not use this macro to declare that a function parameters is unused. For such uses, see QI_UNUSED.
* Example:
*
* .. code-block:: cpp
*
* void foo(std::vector<int> vec)
* {
* auto size = vec.size();
* // QI_ASSERT expands to nothing if debug informations are disabled in the compilation
* // configuration, which would make the `size` variable unused.
* QI_IGNORE_UNUSED(size);
* QI_ASSERT(size > 2);
* }
*
Definition at line 302 of file macro.hpp.