File indexing completed on 2025-02-23 10:08:49
0001
0002
0003
0004
0005 #ifndef INCLUDE_CPPGC_INTERNAL_COMPILER_SPECIFIC_H_
0006 #define INCLUDE_CPPGC_INTERNAL_COMPILER_SPECIFIC_H_
0007
0008 namespace cppgc {
0009
0010 #if defined(__has_attribute)
0011 #define CPPGC_HAS_ATTRIBUTE(FEATURE) __has_attribute(FEATURE)
0012 #else
0013 #define CPPGC_HAS_ATTRIBUTE(FEATURE) 0
0014 #endif
0015
0016 #if defined(__has_cpp_attribute)
0017 #define CPPGC_HAS_CPP_ATTRIBUTE(FEATURE) __has_cpp_attribute(FEATURE)
0018 #else
0019 #define CPPGC_HAS_CPP_ATTRIBUTE(FEATURE) 0
0020 #endif
0021
0022
0023
0024 #if CPPGC_HAS_CPP_ATTRIBUTE(no_unique_address)
0025 #define CPPGC_NO_UNIQUE_ADDRESS [[no_unique_address]]
0026 #else
0027 #define CPPGC_NO_UNIQUE_ADDRESS
0028 #endif
0029
0030 #if CPPGC_HAS_ATTRIBUTE(unused)
0031 #define CPPGC_UNUSED __attribute__((unused))
0032 #else
0033 #define CPPGC_UNUSED
0034 #endif
0035
0036 }
0037
0038 #endif