std::push_heap

Defined in header <algorithm> template< class RandomIt > void push_heap( RandomIt first, RandomIt last ); (1) template< class RandomIt, class Compare > void push_heap( RandomIt first, RandomIt last, Compare comp ); (2) Inserts the element at the position last-1 into the max heap defined by the range [first, last-1). The first version of the function uses operator< to compare the elements, the second uses the given comparison function com

std::putwchar

Defined in header <cwchar> wint_t putwchar( wchar_t ch ); Writes a wide character ch to stdout. Parameters ch - wide character to be written Return value ch on success, WEOF on failure. See also putchar writes a character to stdout (function) fputwcputwc writes a wide character to a file stream (function) C documentation for putwchar

std::putchar

Defined in header <cstdio> int putchar( int ch ); Writes a character ch to stdout. Internally, the character is converted to unsigned char just before being written. Equivalent to putc(ch, stdout). Parameters ch - character to be written Return value On success, returns the written character. On failure, returns EOF and sets the error indicator (see ferror()) on stdout. Example #include <cstdio> int main() { for (char c = 'a'; c != 'z'; c++)

std::promise::set_exception_at_thread_exit

void set_exception_at_thread_exit( std::exception_ptr p ); (since C++11) Stores the exception pointer p into the shared state without making the state ready immediately. The state is made ready when the current thread exits, after all variables with thread-local storage duration have been destroyed. The operation is atomic, i.e. it behaves as though they acquire a single mutex associated with the promise object while updating the promise object. An exception is thrown if there is no sha

std::promise::set_value

void set_value( const R& value ); (1) (member only of generic promise template)(since C++11) void set_value( R&& value ); (2) (member only of generic promise template)(since C++11) void set_value( R& value ); (3) (member only of promise<R&> template specialization)(since C++11) void set_value(); (4) (member only of promise<void> template specialization)(since C++11) Stores the value into the shared state and makes the state ready. The op

std::promise::promise

promise(); (1) (since C++11) template< class Alloc > promise( std::allocator_arg_t, const Alloc& alloc ); (2) (since C++11) promise( promise&& other ); (3) (since C++11) promise( const promise& other ) = delete; (4) (since C++11) Constructs a promise object. 1) Default constructor. Constructs the promise with an empty shared state. 2) Constructs the promise with an empty shared state. The shared state is allocated using alloc. Alloc must meet th

std::promise::set_value_at_thread_exit

void set_value_at_thread_exit( const R& value ); (1) (member only of generic promise template)(since C++11) void set_value_at_thread_exit( R&& value ); (2) (member only of generic promise template)(since C++11) void set_value_at_thread_exit( R& value ); (3) (member only of promise<R&> template specialization)(since C++11) void set_value_at_thread_exit() (4) (member only of promise<void> template specialization)(since C++11) Stores the va

std::promise::swap

void swap( promise& other ); (since C++11) Exchanges the shared states of two promise objects. Parameters other - the promise to swap with Return value (none). Exceptions noexcept specification: noexcept Example See also std::swap(std::promise) (C++11) specializes the std::swap algorithm (function template)

std::promise::set_exception

void set_exception( std::exception_ptr p ); (since C++11) Stores the exception pointer p into the shared state and makes the state ready. The operation is atomic, i.e. it behaves as though they acquire a single mutex associated with the promise object while updating the promise object. An exception is thrown if there is no shared state or the shared state already stores a value or exception. Parameters p - exception pointer to store Return value (none). Exceptions std::

std::promise

Defined in header <future> template< class R > class promise; (1) (since C++11) template< class R > class promise<R&>; (2) (since C++11) template<> class promise<void>; (3) (since C++11) 1) base template 2) non-void specialization, used to communicate objects between threads 3) void specialization, used to communicate stateless events The class template std::promise provides a facility to store a value or an exceptio