|
|
@@ -17,17 +17,34 @@ |
|
|
|
// ——————————————————————— |
|
|
|
// |
|
|
|
|
|
|
|
|
|
|
|
// C++ compiler features detected through __has_cpp_attribute |
|
|
|
|
|
|
|
#if defined(__has_cpp_attribute) && !__has_cpp_attribute(nodiscard) |
|
|
|
# error C++ compiler support for [[nodiscard]] is required (use -std=c++17?) |
|
|
|
#if defined(__has_cpp_attribute) |
|
|
|
|
|
|
|
# if !__has_cpp_attribute(nodiscard) |
|
|
|
# error C++ compiler support for [[nodiscard]] is required (use -std=c++17?) |
|
|
|
# endif |
|
|
|
|
|
|
|
# if !__has_cpp_attribute(fallthrough) |
|
|
|
# error C++ compiler support for [[fallthrough]] is required (use -std=c++17?) |
|
|
|
# endif |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#if defined(__has_cpp_attribute) && !__has_cpp_attribute(fallthrough) |
|
|
|
# error C++ compiler support for [[fallthrough]] is required (use -std=c++17?) |
|
|
|
|
|
|
|
// C++ compiler features detected through __has_feature |
|
|
|
|
|
|
|
#if defined(__has_feature) |
|
|
|
|
|
|
|
# if !__has_feature(cxx_constexpr) |
|
|
|
# error C++ compiler for constexpr is required (use -std=c++11?) |
|
|
|
# endif |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
// Define some attribute macros. |
|
|
|
|
|
|
|
// Define some attribute macros |
|
|
|
|
|
|
|
#ifdef __GNUC__ |
|
|
|
# define lol_attr_printf_format(n, p) __attribute__((format(printf, n, p))) |
|
|
@@ -35,9 +52,3 @@ |
|
|
|
# define lol_attr_printf_format(n, p) |
|
|
|
#endif |
|
|
|
|
|
|
|
#if defined(_WIN32) |
|
|
|
# define LOL_ATTR_STDCALL __stdcall |
|
|
|
#else |
|
|
|
# define LOL_ATTR_STDCALL /* */ |
|
|
|
#endif |
|
|
|
|