std::thread::swap

void swap( thread& other ); (since C++11) Exchanges the underlying handles of two thread objects. Parameters other - the thread to swap with Return value (none). Exceptions noexcept specification: noexcept Example #include <iostream> #include <thread> #include <chrono> void foo() { std::this_thread::sleep_for(std::chrono::seconds(1)); } void bar() { std::this_thread::sleep_for(std::chrono::seconds(1)); } int main() { std::t

std::packaged_task::make_ready_at_thread_exit

void make_ready_at_thread_exit( ArgTypes... args ); (since C++11) Calls the stored task with forwarded args as the arguments. The return value of the task or any exception thrown by it is stored in the shared state of *this. The shared state is only made ready after the current thread exits and all objects of thread local storage duration are destroyed. Parameters args - the parameters to pass on invocation of the stored task Return value (none). Exceptions std::future_

std::match_results::begin

iterator begin(); (since C++11) const_iterator begin() const; (since C++11) const_iterator cbegin() const; (since C++11) Returns an iterator to the beginning of the list of sub-matches. If match was successful, the iterator will point to the entire matched expression. Parameters (none). Return value Iterator to the first sub-match. Exceptions noexcept specification: noexcept Complexity Constant. See also endcend returns iterator to the end of the list of

std::swap(std::packaged_task)

template< class Function, class... Args > void swap( packaged_task<Function(Args...)> &lhs, packaged_task<Function(Args...)> &rhs ); (since C++11) Specializes the std::swap algorithm for std::packaged_task. Exchanges the state of lhs with that of rhs. Effectively calls lhs.swap(rhs). Parameters lhs, rhs - packaged tasks whose states to swap Return value (none). Exceptions noexcept specification: noexcept Example See also s

operators (std::discrete_distribution)

template< class CharT, class Traits, class ResultType > std::basic_ostream<CharT,Traits>& operator<<( std::basic_ostream<CharT,Traits>& ost, const discrete_distribution<ResultType>& d ); (1) template< class CharT, class Traits, class ResultType > std::basic_istream<CharT,Traits>& operator>>( std::basic_istream<CharT,Traits>& ist,

Range-based for loop

Executes a for loop over a range. Used as a more readable equivalent to the traditional for loop operating over a range of values, such as all elements in a container. Syntax attr(optional) for ( range_declaration : range_expression ) loop_statement attr(C++11) - any number of attributes range_declaration - a declaration of a named variable, whose type is the type of the element of the sequence represented by range_expression, or a reference to that type. Often uses the a

std::abs(std::valarray)

Defined in header <valarray> template< class T > valarray<T> abs( const valarray<T>& va ); Computes absolute value of each element in the value array. Parameters va - value array to apply the operation to Return value Value array containing absolute values of the values in va. Notes Unqualified function (abs) is used to perform the computation. If such function is not available, std::abs is used due to argument dependent lookup. The fu

std::basic_streambuf::pubimbue

std::locale pubimbue( const std::locale& loc ); (1) protected: virtual void imbue( const std::locale& loc ); (2) Changes the associated locale. 1) Calls imbue(loc) of the most derived class. 2) The base class version of this function has no effect. The derived classes may override this function in order to be informed about the changes of the locale. The derived class may cache the locale and member facets between calls to imbue(). Parameters loc - locale object to

std::get_temporary_buffer

Defined in header <memory> template< class T > std::pair< T*, std::ptrdiff_t > get_temporary_buffer( std::ptrdiff_t count ); Allocates uninitialized contiguous storage, which should be sufficient to store up to count adjacent objects of type T. The request is non-binding and the implementation may allocate less or more than necessary to store count adjacent objects. Parameters count - the desired number of objects Return value An std::pair holding

std::ios_base::fmtflags

typedef /*implementation defined*/ fmtflags; static constexpr fmtflags dec = /*implementation defined*/ static constexpr fmtflags oct = /*implementation defined*/ static constexpr fmtflags hex = /*implementation defined*/ static constexpr fmtflags basefield = /*implementation defined (dec | oct | hex)*/ static constexpr fmtflags left = /*implementation defined*/ static constexpr fmtflags right = /*implementation defined*/ static constexpr fmtflags internal = /*implementation define