Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
std::noop_c...tine_promise(3) C++ Standard Libarystd::noop_c...tine_promise(3)

NAME
       std::noop_coroutine_promise - std::noop_coroutine_promise

Synopsis
	  Defined in header <coroutine>
	  struct noop_coroutine_promise	{};  (since C++20)

	  noop_coroutine_promise is the	promise	type of	no-op coroutines.

	  A no-op coroutine behaves as if it

	    * does nothing other than the control flow of a coroutine, and
	    * is suspended immediately after beginning and resumption, and
	    *  has  a coroutine	state such that	destroying the state is	no-op,
       and
	    * never  reaches  its  final  suspended  point  if	there  is  any
       std::coroutine_handle
	      referring	to it.

	   This	section	is incomplete
	   Reason: more	precise	wording

	  No-op	 coroutines  can  be  started by std::noop_coroutine, and con-
       trolled by the
	  coroutine handle it returns. The returned  coroutine	handle	is  of
       type
	  std::noop_coroutine_handle, which is a synonym for
	  std::coroutine_handle<std::noop_coroutine_promise>.

	  Some	operations  of a no-op coroutines are determined no-op at com-
       pile time through
	  the type std::noop_coroutine_handle.

	   This	section	is incomplete
	   Reason: usage of no-op coroutines

Example
	   This	section	is incomplete
	   Reason: no example

See also
	  noop_coroutine	creates	a coroutine handle that	has no observ-
       able effects when
	  (C++20)		resumed	or destroyed
				(function)
	  noop_coroutine_handle		std::coroutine_handle<std::noop_corou-
       tine_promise>, intended
	  (C++20)		to refer to a no-op coroutine
				(typedef)

http://cppreference.com		  2022.07.31	 std::noop_c...tine_promise(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::noop_coroutine_promise&sektion=3&manpath=FreeBSD+Ports+15.0>

home | help