Guard <experimental/coroutine> against older Clang versions.
authorEric Fiselier <eric@efcs.ca>
Fri, 26 May 2017 01:52:59 +0000 (01:52 +0000)
committerEric Fiselier <eric@efcs.ca>
Fri, 26 May 2017 01:52:59 +0000 (01:52 +0000)
commiteb04c8cae2f0867c3959285a992f5319b8d6cfc7
tree7f943ee012222a8e5c89b2d6f49df1b51dfb6682
parentf56a6d84b6b7c3432db6c2ed7280d3dbe3cb4f3d
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.

llvm-svn: 303956
libcxx/include/__config
libcxx/include/experimental/coroutine