Isle
Loading...
Searching...
No Matches
compat.h
Go to the documentation of this file.
1#ifndef COMPAT_H
2#define COMPAT_H
3
4// Various macros to enable compiling with other/newer compilers.
5
6#if defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER >= 1100)
7#define COMPAT_MODE
8#endif
9
10// Disable "identifier was truncated to '255' characters" warning.
11// Impossible to avoid this if using STL map or set.
12// This removes most (but not all) occurrences of the warning.
13#pragma warning(disable : 4786)
14
15#define MSVC420_VERSION 1020
16
17// We use `override` so newer compilers can tell us our vtables are valid,
18// however this keyword was added in C++11, so we define it as empty for
19// compatibility with older compilers.
20#if __cplusplus < 201103L
21#define override
22#define static_assert(expr, msg)
23#endif
24
25#endif // COMPAT_H