Guard <experimental/coroutine> against older Clang versions.
Clang started providing -fcoroutines and defining __cpp_coroutines
way before it implemented the __builtin_coro_foo functions. This
means that simply checking if __cpp_coroutines is not a sufficient
way of detecting the actual feature.
This patch implements _LIBCPP_HAS_NO_COROUTINES which implements
a slightly more complex feature check. Specifically it requires
__cpp_coroutines >= 201703L, which only holds for Clang 5.0 built
after 2017/05/24.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@303956 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/__config b/include/__config
index 4ad700e..32e542b 100644
--- a/include/__config
+++ b/include/__config
@@ -1126,6 +1126,10 @@
# define _LIBCPP_HAS_NO_IS_AGGREGATE
#endif
+#if !defined(__cpp_coroutines) || __cpp_coroutines < 201703L
+# define _LIBCPP_HAS_NO_COROUTINES
+#endif
+
#endif // __cplusplus
// Decide whether to use availability macros.