//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// //============================================================================== // NOTICE: This file has been modified by Green Hills Software, Inc. Such // modifications are subject to copyright by Green Hills Software, Inc. See the // "Green Hills Software Modifications" section in the LICENSE.txt included with // this distribution for more information. //============================================================================== #ifndef _LIBCPP___COROUTINE_COROUTINE_TRAITS_H #define _LIBCPP___COROUTINE_COROUTINE_TRAITS_H #include <__config> #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif #if _LIBCPP_STD_VER > 17 #if defined(__ghs__) #pragma ghs start_cxx_lib_header #pragma ghs startdata #if defined(__ghs_max_pack_value) #pragma pack (push, __ghs_max_pack_value) #endif #endif _LIBCPP_BEGIN_NAMESPACE_STD // [coroutine.traits] // [coroutine.traits.primary] // The header defined the primary template coroutine_traits such that // if ArgTypes is a parameter pack of types and if the qualified-id R::promise_type // is valid and denotes a type ([temp.deduct]), then coroutine_traits // has the following publicly accessible memebr: // // using promise_type = typename R::promise_type; // // Otherwise, coroutine_traits has no members. template struct __coroutine_traits_sfinae {}; template struct __coroutine_traits_sfinae< _Tp, __void_t > { using promise_type = typename _Tp::promise_type; }; template struct coroutine_traits : public __coroutine_traits_sfinae<_Ret> { }; _LIBCPP_END_NAMESPACE_STD #if defined(__ghs__) #if defined(__ghs_max_pack_value) #pragma pack(pop) #endif #pragma ghs enddata #pragma ghs end_cxx_lib_header #endif #endif // __LIBCPP_STD_VER > 17 #endif // _LIBCPP___COROUTINE_COROUTINE_TRAITS_H