17 Language support library [support]

17.12 Coroutines [support.coroutine]

17.12.3 Coroutine traits [coroutine.traits]

17.12.3.1 General [coroutine.traits.general]

Subclause [coroutine.traits] defines requirements on classes representing coroutine traits, and defines the class template coroutine_­traits that meets those requirements.

17.12.3.2 Class template coroutine_­traits [coroutine.traits.primary]

The header <coroutine> defines 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<R, ArgTypes...> has the following publicly accessible member: using promise_type = typename R::promise_type;
Otherwise, coroutine_­traits<R, ArgTypes...> has no members.
Program-defined specializations of this template shall define a publicly accessible nested type named promise_­type.