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

FreeBSD Manual Pages

  
 
  

home | help
std::suspend_never(3)	      C++ Standard Libary	 std::suspend_never(3)

NAME
       std::suspend_never - std::suspend_never

Synopsis
	  Defined in header <coroutine>
	  struct suspend_never;		 (since	C++20)

	  suspend_never	 is  an	empty class which can be used to indicate that
       an await
	  expression never suspends and	does not produce a value.

Member functions
	  await_ready	indicates that an await	expression never suspends
	  (C++20)	(public	member function)
	  await_suspend	no-op
	  (C++20)	(public	member function)
	  await_resume	no-op
	  (C++20)	(public	member function)

       std::suspend_never::await_ready

	  constexpr bool await_ready() const noexcept {	return true; }	(since
       C++20)

	  Always returns true, indicating that an await	expression never  sus-
       pends.

       std::suspend_never::await_suspend

	  constexpr void await_suspend(std::coroutine_handle<>)	const noexcept
       (since C++20)
	  {}

	  Does nothing.

       std::suspend_never::await_resume

	  constexpr void await_resume()	const noexcept {}  (since C++20)

	  Does	nothing.  An await expression does not produce a value if sus-
       pend_never is used.

Example
	   This	section	is incomplete
	   Reason: no example

See also
	  suspend_always indicates that	an await-expression should always sus-
       pend
	  (C++20)	 (class)

http://cppreference.com		  2022.07.31		 std::suspend_never(3)

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

home | help