Pārlūkot izejas kodu

Clean up the features.h header.

wip/core-clipp
Sam Hocevar pirms 4 gadiem
vecāks
revīzija
f0b8cfc6f2
1 mainītis faili ar 22 papildinājumiem un 11 dzēšanām
  1. +22
    -11
      include/lol/base/private/features.h

+ 22
- 11
include/lol/base/private/features.h Parādīt failu

@@ -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


Notiek ielāde…
Atcelt
Saglabāt