home | help
std::experi...onal_future(3)   C++ Standard Libary  std::experi...onal_future(3)

NAME
     std::experimental::make_exceptional_future - std::experimental::make_excep-
     tional_future

Synopsis
	Defined in header <experimental/future>
	template< class T >					    (1) (concur-
     rency TS)
	future<T> make_exceptional_future( std::exception_ptr ex );
	template< class T, class E >				    (2) (concur-
     rency TS)
	future<T> make_exceptional_future( E ex );

	1) Creates a shared state of type T that is immediately ready and stores
     the
	exception  pointer  ex, then return a future associated with that shared
     state, as if
	by promise<T> p; p.set_exception(ex); return p.get_future();. The behav-
     ior is
	undefined if ex is null.
	2) Creates a shared state of type T that is immediately ready and stores
     an
	exception pointer created from ex, then return a future associated  with
     that shared
	state,	 as   if   by	promise<T>  p;	p.set_exception(std::make_excep-
     tion_ptr(ex)); return
	p.get_future();.

Return value
	A future object associated with the shared state that was created.

See also
	make_ready_future produces a future that is ready immediately and  holds
     the given
	(concurrency TS)  value
			  (function template)

http://cppreference.com 	   2024.06.10	    std::experi...onal_future(3)

home | help