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::ptr_fun

Defined in header <functional> template< class Arg, class Result > std::pointer_to_unary_function<Arg,Result> ptr_fun( Result (*f)(Arg) ); (1) (until C++17)(deprecated since C++11) template< class Arg1, class Arg2, class Result > std::pointer_to_binary_function<Arg1,Arg2,Result> ptr_fun( Result (*f)(Arg1, Arg2) ); (2) (until C++17)(deprecated since C++11) Creates a function wrapper object (either std::pointer_to_unary_function or std::p

std::ptrdiff_t

Defined in header <cstddef> typedef /*implementation-defined*/ ptrdiff_t; std::ptrdiff_t is the signed integer type of the result of subtracting two pointers. Notes std::ptrdiff_t is used for pointer arithmetic and array indexing, if negative values are possible. Programs that use other types, such as int, may fail on, e.g. 64-bit systems when the index exceeds INT_MAX or if it relies on 32-bit modular arithmetic. When working with the C++ container library, the proper t

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_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::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::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_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::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::get_future

std::future<T> get_future(); (since C++11) Returns a future object associated with the same shared state as *this. Exception is thrown if *this has no shared state or get_future has already been called. To get multiple "pop" ends of the promise-future communication channel, use std::future::share. Parameters (none). Return value A future referring to the shared state of *this. Exceptions std::future_error on the following conditions: *this has no shared state. The error