Skip to content

Commit 634b128

Browse files
committed
🛠 Incandescent anger, honestly
1 parent b441b7e commit 634b128

File tree

1 file changed

+20
-7
lines changed
  • include/ztd/version/detail

1 file changed

+20
-7
lines changed

‎include/ztd/version/detail/is.h

+20-7
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,27 @@
9494
#if defined(ZTD_HAS_ATTRIBUTE)
9595
#define ZTD_HAS_ATTRIBUTE_I_(...) ZTD_HAS_ATTRIBUTE(__VA_ARGS__)
9696
#elif ZTD_IS_ON(ZTD_CXX) && defined(__has_cpp_attribute)
97-
#define ZTD_HAS_ATTRIBUTE_I_(...) __has_cpp_attribute(__VA_ARGS__)
97+
#if defined(_MSC_VER)
98+
// Assume Microsoft will get their shit together in a couple major versions
99+
#if _MSC_FULL_VER > 196000000
100+
#define ZTD_HAS_ATTRIBUTE_I_(...) __has_cpp_attribute(__VA_ARGS__)
101+
#else
102+
#define ZTD_HAS_ATTRIBUTE_I_(...) 0L
103+
#endif
104+
#else
105+
#define ZTD_HAS_ATTRIBUTE_I_(...) __has_cpp_attribute(__VA_ARGS__)
106+
#endif
98107
#elif ZTD_IS_ON(ZTD_C) && defined(__has_c_attribute)
99-
#if defined(_MSC_VER) && _MSC_FULL_VER > 196000000
100-
// Assume Microsoft will get their shit together in a couple major versions
101-
#define ZTD_HAS_ATTRIBUTE_I_(...) 0L
102-
#else
103-
#define ZTD_HAS_ATTRIBUTE_I_(...) __has_attribute(__VA_ARGS__)
104-
#endif
108+
#if defined(_MSC_VER)
109+
// Assume Microsoft will get their shit together in a couple major versions
110+
#if _MSC_FULL_VER > 196000000
111+
#define ZTD_HAS_ATTRIBUTE_I_(...) __has_c_attribute(__VA_ARGS__)
112+
#else
113+
#define ZTD_HAS_ATTRIBUTE_I_(...) 0L
114+
#endif
115+
#else
116+
#define ZTD_HAS_ATTRIBUTE_I_(...) __has_c_attribute(__VA_ARGS__)
117+
#endif
105118
#elif defined(__has_attribute)
106119
#define ZTD_HAS_ATTRIBUTE_I_(...) __has_attribute(__VA_ARGS__)
107120
#else

0 commit comments

Comments
 (0)