Corrade/Corrade.h file

Basic definitions.

Contents

Namespaces

namespace Corrade
Root namespace.

Defines

#define CORRADE_MSVC2019_COMPATIBILITY
MSVC 2019 compatibility.
#define CORRADE_MSVC2017_COMPATIBILITY
MSVC 2017 compatibility.
#define CORRADE_MSVC2015_COMPATIBILITY
MSVC 2015 compatibility.
#define CORRADE_BUILD_DEPRECATED
Build with deprecated API included.
#define CORRADE_BUILD_STATIC
Static library build.
#define CORRADE_BUILD_MULTITHREADED new in 2019.10
Multi-threaded build.
#define CORRADE_CXX_STANDARD
C++ standard version.
#define CORRADE_TARGET_UNIX
Unix target.
#define CORRADE_TARGET_APPLE
Apple target.
#define CORRADE_TARGET_IOS
iOS target
#define CORRADE_TARGET_IOS_SIMULATOR
iOS Simulator target
#define CORRADE_TARGET_WINDOWS
Windows target.
#define CORRADE_TARGET_WINDOWS_RT
Windows RT target.
#define CORRADE_TARGET_EMSCRIPTEN
Emscripten target.
#define CORRADE_TARGET_ANDROID
Android target.
#define CORRADE_TARGET_X86
x86 target
#define CORRADE_TARGET_ARM
ARM target.
#define CORRADE_TARGET_POWERPC new in 2019.10
PowerPC target.
#define CORRADE_TARGET_BIG_ENDIAN new in Git master
Big-Endian target.
#define CORRADE_TARGET_GCC new in Git master
GCC compiler.
#define CORRADE_TARGET_CLANG new in Git master
Clang compiler.
#define CORRADE_TARGET_APPLE_CLANG new in Git master
Apple's Clang compiler.
#define CORRADE_TARGET_CLANG_CL new in Git master
Clang-CL compiler.
#define CORRADE_TARGET_MSVC new in Git master
MSVC compiler.
#define CORRADE_TARGET_MINGW new in Git master
MinGW compiler.
#define CORRADE_TARGET_LIBCXX new in 2019.10
STL libc++ target.
#define CORRADE_TARGET_LIBSTDCXX new in 2019.10
STL libstdc++ target.
#define CORRADE_TARGET_DINKUMWARE new in 2019.10
STL Dinkumware target.
#define CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
PluginManager doesn't have dynamic plugin support on this platform.
#define CORRADE_TESTSUITE_TARGET_XCTEST
Target XCTest with TestSuite.
#define CORRADE_UTILITY_USE_ANSI_COLORS
Use ANSI escape sequences for colored debug output on Windows.

Define documentation

#define CORRADE_MSVC2019_COMPATIBILITY

MSVC 2019 compatibility.

Defined if compatibility mode for MSVC 2019 is enabled.

#define CORRADE_MSVC2017_COMPATIBILITY

MSVC 2017 compatibility.

Defined if compatibility mode for MSVC 2017 is enabled.

#define CORRADE_MSVC2015_COMPATIBILITY

MSVC 2015 compatibility.

Defined if compatibility mode for MSVC 2015 is enabled.

#define CORRADE_BUILD_DEPRECATED

Build with deprecated API included.

Defined if the library contains deprecated API (which will be removed in the future). To preserve backward compatibility, Corrade is by default built with deprecated API included.

#define CORRADE_BUILD_STATIC

Static library build.

Defined if built as static libraries. Default are shared libraries.

#define CORRADE_BUILD_MULTITHREADED new in 2019.10

Multi-threaded build.

Defined if the library is built in a way that makes it possible to safely use certain Corrade features simultaenously in multiple threads. In particular:

  • Utility::Debug and derived classes use it to have thread-local scoped output redirection and coloring
  • PluginManager::Manager uses it for thread-local plugin loading, unloading and management

Apart from these, Utility::Resource uses global data but isn't affected by this option, as majority of its operation is only reading from the global storage. All other functionality is free of any read/write access to global data.

#define CORRADE_CXX_STANDARD

C++ standard version.

Expands to __cplusplus macro on all sane compilers; on MSVC uses _MSVC_LANG if defined (since Visual Studio 2015 Update 3), otherwise reports C++11. The returned version is:

  • 201103 when C++11 is used
  • 201402 when C++14 is used
  • 201703 when C++17 is used
  • greater than 201703 when C++2a is used

Unlike most other CORRADE_* variables, this macro is not exposed to CMake as because the meaning is unclear in projects that combine more different C++ standards in a single project.

#define CORRADE_TARGET_UNIX

Unix target.

Defined if the library is built for some Unix flavor (Linux, BSD, macOS, iOS, Android...). Note that while the behavior of Emscripten is closely emulating Unix systems, CORRADE_TARGET_UNIX is not defined there, only CORRADE_TARGET_EMSCRIPTEN.

#define CORRADE_TARGET_APPLE

Apple target.

Defined if the library is built for Apple platforms (macOS, iOS).

#define CORRADE_TARGET_IOS

iOS target

Defined if the library is built for iOS (device or simulator).

#define CORRADE_TARGET_IOS_SIMULATOR

iOS Simulator target

Defined if the library is built for iOS Simulator.

#define CORRADE_TARGET_WINDOWS

Windows target.

Defined if the library is built for Windows (desktop, Store or Phone).

#define CORRADE_TARGET_WINDOWS_RT

Windows RT target.

Defined if the library is built for Windows Store or Phone.

#define CORRADE_TARGET_EMSCRIPTEN

Emscripten target.

Defined if the library is built for Emscripten. Note that while the behavior of Emscripten is closely emulating Unix systems, CORRADE_TARGET_UNIX is not defined there, only CORRADE_TARGET_EMSCRIPTEN.

#define CORRADE_TARGET_ANDROID

Android target.

Defined if the library is built for Android.

#define CORRADE_TARGET_X86

x86 target

Defined if the library is built for x86 platforms (32 or 64-bit). Note that unlike other CORRADE_TARGET_* variables, this variable, CORRADE_TARGET_ARM, CORRADE_TARGET_POWERPC and CORRADE_TARGET_BIG_ENDIAN are not exposed in CMake because the meaning is unclear on platforms with multi-architecture binaries. If neither CORRADE_TARGET_X86, CORRADE_TARGET_ARM nor CORRADE_TARGET_POWERPC is defined, the platform might be either CORRADE_TARGET_EMSCRIPTEN or any other that the library doesn't know about yet.

#define CORRADE_TARGET_ARM

ARM target.

Defined if the library is built for ARM platforms (32 or 64-bit). Note that unlike other CORRADE_TARGET_* variables, this variable, CORRADE_TARGET_X86, CORRADE_TARGET_POWERPC and CORRADE_TARGET_BIG_ENDIAN are not exposed in CMake because the meaning is unclear on platforms with multi-architecture binaries. If neither CORRADE_TARGET_X86, CORRADE_TARGET_ARM nor CORRADE_TARGET_POWERPC is defined, the platform might be either CORRADE_TARGET_EMSCRIPTEN or any other that the library doesn't know about yet.

#define CORRADE_TARGET_POWERPC new in 2019.10

PowerPC target.

Defined if the library is built for PowerPC platforms (32 or 64-bit). Note that unlike other CORRADE_TARGET_* variables, this variable, CORRADE_TARGET_X86, CORRADE_TARGET_ARM and CORRADE_TARGET_BIG_ENDIAN are not exposed in CMake because the meaning is unclear on platforms with multi-architecture binaries. If neither CORRADE_TARGET_X86, CORRADE_TARGET_ARM nor CORRADE_TARGET_POWERPC is defined, the platform might be either CORRADE_TARGET_EMSCRIPTEN or any other that the library doesn't know about yet.

#define CORRADE_TARGET_BIG_ENDIAN new in Git master

Big-Endian target.

Defined when the platform defaults to Big-Endian (such as HP/PA RISC, Motorola 68k, Big-Endian MIPS, PowerPC and SPARC). Not defined on Little-Endian platforms (such as x86 and ARM). Note that some platforms are Bi-Endian, meaning the endianness can be switched at runtime (and thus can't be detected at compile-time), this macro only reflects the usual architecture default. Moreover, unlike other CORRADE_TARGET_* variables, this variable, CORRADE_TARGET_X86, CORRADE_TARGET_ARM and CORRADE_TARGET_POWERPC are not exposed in CMake because the meaning is unclear on platforms with multi-architecture binaries.

#define CORRADE_TARGET_GCC new in Git master

GCC compiler.

Defined if the code is being compiled by GCC or GCC-compatible Clang (which is CORRADE_TARGET_APPLE_CLANG but not CORRADE_TARGET_CLANG_CL, for example). While this variable is exposed in CMake as well, it's not guaranteed that the reported compiler is consistent between CMake and C++ — for example, a library can be built with GCC and then used via Clang.

#define CORRADE_TARGET_CLANG new in Git master

Clang compiler.

Defined if the code is being compiled by Clang or any of its variants (CORRADE_TARGET_APPLE_CLANG, CORRADE_TARGET_CLANG_CL). If this variable is defined, usually CORRADE_TARGET_GCC is also defined, except for Clang-CL. While this variable is exposed in CMake as well, it's not guaranteed that the reported compiler is consistent between CMake and C++ — for example, a library can be built with Clang and then used via GCC.

#define CORRADE_TARGET_APPLE_CLANG new in Git master

Apple's Clang compiler.

Defined if the code is being compiled by Apple's Clang. If this variable is defined, CORRADE_TARGET_GCC and CORRADE_TARGET_CLANG are also defined. This is primarily useful when checking for Clang version, as Apple uses a different versioning scheme. While this variable is exposed in CMake as well, it's not guaranteed that the reported compiler is consistent between CMake and C++ — for example, a library can be built with Clang and then used via GCC.

#define CORRADE_TARGET_CLANG_CL new in Git master

Clang-CL compiler.

Defined if the code is being compiled by Clang with a MSVC frontend. If this variable is defined, CORRADE_TARGET_CLANG and CORRADE_TARGET_MSVC is also defined (but CORRADE_TARGET_GCC not). While this variable is exposed in CMake as well, it's not guaranteed that the reported compiler is consistent between CMake and C++ — for example, a library can be built with Clang-CL and then used via MSVC.

#define CORRADE_TARGET_MSVC new in Git master

MSVC compiler.

Defined if the code is being compiled by MSVC or Clang with a MSVC frontend. If this variable is defined, CORRADE_TARGET_CLANG might also be defined. While this variable is exposed in CMake as well, it's not guaranteed that the reported compiler is consistent between CMake and C++ — for example, a library can be built with MSVC and then used via Clang-CL.

#define CORRADE_TARGET_MINGW new in Git master

MinGW compiler.

Defined if the code is being compiled by GCC / Clang running under MinGW. If this variable is defined, CORRADE_TARGET_GCC and possibly also CORRADE_TARGET_CLANG are defined. While this variable is exposed in CMake as well, it's not guaranteed that the reported compiler is consistent between CMake and C++ — for example, a library can be built with MSVC and then used via Clang-CL.

#define CORRADE_TARGET_LIBCXX new in 2019.10

STL libc++ target.

Defined if the library is built against Clang libc++ STL implementation. This is most common on Apple macOS and iOS and on newer Android NDKs, it's also sometimes used on Linux. Note that unlike other CORRADE_TARGET_* variables, this variable, CORRADE_TARGET_LIBSTDCXX and CORRADE_TARGET_DINKUMWARE are not exposed in CMake because the detection is non-trivial.

#define CORRADE_TARGET_LIBSTDCXX new in 2019.10

STL libstdc++ target.

Defined if the library is built against GCC libstdc++ STL implementation. This is most common on Linux and under MinGW, note that Clang is able to use libstdc++ as well. Note that unlike other CORRADE_TARGET_* variables, this variable, CORRADE_TARGET_LIBCXX and CORRADE_TARGET_DINKUMWARE are not exposed in CMake because the detection is non-trivial.

#define CORRADE_TARGET_DINKUMWARE new in 2019.10

STL Dinkumware target.

Defined if the library is built against Dinkumware STL implementation (used by MSVC). Note that Clang is able to use this implementation as well. Note that unlike other CORRADE_TARGET_* variables, this variable, CORRADE_TARGET_LIBSTDCXX and CORRADE_TARGET_DINKUMWARE are not exposed in CMake because the detection is non-trivial.

#define CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT

PluginManager doesn't have dynamic plugin support on this platform.

Defined if the PluginManager library doesn't support dynamic plugin loading due to platform limitations. Defined on Emscripten, Windows RT, iOS and Android.

#define CORRADE_TESTSUITE_TARGET_XCTEST

Target XCTest with TestSuite.

Defined if the TestSuite library is targeting Xcode XCTest. Available only on Apple platforms. Enabled using TESTSUITE_TARGET_XCTEST CMake option when building Corrade.

#define CORRADE_UTILITY_USE_ANSI_COLORS

Use ANSI escape sequences for colored debug output on Windows.

By default colored output using Utility::Debug on Windows is done using WINAPI that has a limited functionality, because ANSI escape sequences are supported only on Windows 10 or when using non-standard console emulators. Available only on Windows, all other platforms use ANSI sequences implicitly. Enabled using UTILITY_USE_ANSI_COLORS CMake option when building Corrade.

Note that on Windows 10 you need to additionally enable ANSI color support in the console. This is done automatically when you link to the Corrade Main library.