ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
compilers.hpp File Reference

Go to the source code of this file.

Macros

Code Selection

The macros listed here include or prune code, dependent on different preprocessor symbols. They are mainly given to avoid #if/#else/#endif statements for small code pieces.

#define ALIB_DBG(...)   __VA_ARGS__
 
#define ALIB_REL(...)
 
#define ALIB_REL_DBG(releaseCode, ...)   __VA_ARGS__
 
C/C++ Language And Linkage Macros

The macros listed here are supporting C++ compilation and linking control and language specific utilities.

#define ALIB_API   __declspec(dllexport)
 
#define ALIB_CONSTEXPR17   constexpr
 
#define ALIB_CPP14_CONSTEXPR   constexpr
 
#define ALIB_CPP14_REL_CONSTEXPR   constexpr
 
#define ALIB_CPP17_CONSTEXPR   constexpr
 
#define ALIB_CPP17_REL_CONSTEXPR   constexpr
 
#define ALIB_FORCE_INLINE   __forceinline
 
#define ALIB_NO_RETURN   [[ noreturn ]]
 
#define ALIB_NODISCARD   [[nodiscard]]
 
C/C++ Compiler Warning Control

ALib sources are designed to be compiled on different compilers using the highest possible compiler warning levels available. In some situations, some warnings need to be temporarily disabled. The following macros do this in a compiler agnostic way.

#define ALIB_FALLTHROUGH   [[clang::fallthrough]];
 
#define ALIB_WARNINGS_ALLOW_BITWISE_SWITCH
 
#define ALIB_WARNINGS_ALLOW_MACRO_REDEFINITION
 
#define ALIB_WARNINGS_ALLOW_NULL_POINTER_PASSING   _Pragma("clang diagnostic push") \
 
#define ALIB_WARNINGS_ALLOW_SHIFT_COUNT_OVERFLOW
 
#define ALIB_WARNINGS_ALLOW_SPARSE_ENUM_SWITCH
 
#define ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE
 
#define ALIB_WARNINGS_ALLOW_UNSAFE_FUNCTION_OR_VARIABLE
 
#define ALIB_WARNINGS_IGNORE_DOCS
 
#define ALIB_WARNINGS_IGNORE_FUNCTION_TEMPLATE
 
#define ALIB_WARNINGS_IGNORE_IF_CONSTEXPR   _Pragma("clang diagnostic push") \
 
#define ALIB_WARNINGS_IGNORE_INTEGER_OVERFLOW
 
#define ALIB_WARNINGS_IGNORE_INTEGRAL_CONSTANT_OVERFLOW   _Pragma("clang diagnostic push") \
 
#define ALIB_WARNINGS_IGNORE_NOTHING_RETURNED
 
#define ALIB_WARNINGS_IGNORE_RESERVED_IDENTIFIER
 
#define ALIB_WARNINGS_IGNORE_UNUSED_MACRO
 
#define ALIB_WARNINGS_IGNORE_UNUSED_PARAMETER
 
#define ALIB_WARNINGS_MACRO_NOT_USED_OFF
 
#define ALIB_WARNINGS_OVERLOAD_VIRTUAL_OFF
 
#define ALIB_WARNINGS_RESERVED_MACRO_NAME_OFF
 
#define ALIB_WARNINGS_RESTORE   _Pragma("clang diagnostic pop") \
 
#define ALIB_WARNINGS_UNINITIALIZED_OFF
 

Detailed Description


This header file is part of the ALib C++ Library. It does neither belong to a fileset, nor to a specific module of ALib, but is included in any ALib Distribution.

© 2013-2023 A-Worx GmbH, Germany. Published under Boost Software License.

Note
This header is not shown in inclusion graphs of this documentation, as it is always included directly or indirectly.

Definition in file compilers.hpp.