|
|
|||
File indexing completed on 2026-05-03 08:13:17
0001 //===----------------------------------------------------------------------===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 0009 #ifndef _LIBCPP___COROUTINE_COROUTINE_TRAITS_H 0010 #define _LIBCPP___COROUTINE_COROUTINE_TRAITS_H 0011 0012 #include <__config> 0013 #include <__type_traits/void_t.h> 0014 0015 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 0016 # pragma GCC system_header 0017 #endif 0018 0019 #if _LIBCPP_STD_VER >= 20 0020 0021 _LIBCPP_BEGIN_NAMESPACE_STD 0022 0023 // [coroutine.traits] 0024 // [coroutine.traits.primary] 0025 // The header <coroutine> defined the primary template coroutine_traits such that 0026 // if ArgTypes is a parameter pack of types and if the qualified-id R::promise_type 0027 // is valid and denotes a type ([temp.deduct]), then coroutine_traits<R, ArgTypes...> 0028 // has the following publicly accessible memebr: 0029 // 0030 // using promise_type = typename R::promise_type; 0031 // 0032 // Otherwise, coroutine_traits<R, ArgTypes...> has no members. 0033 template <class _Tp, class = void> 0034 struct __coroutine_traits_sfinae {}; 0035 0036 template <class _Tp> 0037 struct __coroutine_traits_sfinae< _Tp, __void_t<typename _Tp::promise_type> > { 0038 using promise_type = typename _Tp::promise_type; 0039 }; 0040 0041 template <class _Ret, class... _Args> 0042 struct coroutine_traits : public __coroutine_traits_sfinae<_Ret> {}; 0043 0044 _LIBCPP_END_NAMESPACE_STD 0045 0046 #endif // __LIBCPP_STD_VER >= 20 0047 0048 #endif // _LIBCPP___COROUTINE_COROUTINE_TRAITS_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|