copy initialization

Initializes an object from another object. Syntax T object = other; (1) T object = {other} ; (2) (until C++11) f(other) (3) return other; (4) throw object; catch (T object). (5) T array[N] = {other}; (6) Explanation Copy initialization is performed in the following situations: 1) when a named variable (automatic, static, or thread-local) of a non-reference type T is declared with the initializer consisting of an equals sign followed by an expression.

std::acos(std::valarray)

Defined in header <valarray> template< class T > valarray<T> acos( const valarray<T>& va ); For each element in va computes arc cosine of the value of the element. Parameters va - value array to apply the operation to Return value Value array containing arc cosines of the values in va. Notes Unqualified function (acos) is used to perform the computation. If such function is not available, std::acos is used due to argument dependent loo

locale

This header is part of the localization library. Classes locale set of polymorphic facets that encapsulate cultural differences (class) String and stream conversions wstring_convert (C++11) performs conversions between a wide string and a byte string (class template) wbuffer_convert (C++11) performs conversion between a byte stream buffer and a wide stream buffer (class template) Facet category base classes ctype_base defines character classification ca

std::iswpunct

Defined in header <cwctype> int iswpunct( std::wint_t ch ); Checks if the given wide character is a punctuation character, i.e. it is one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ or any punctuation character specific to the current locale. Parameters ch - wide character Return value Non-zero value if the wide character is a punctuation character, zero otherwise. Example #include <iostream> #include <cwctype> #include <clocale> int

alignas specifier

Specifies the alignment requirement of a type or an object. Syntax alignas( expression ) alignas( type-id ) alignas( pack ... ) 1) alignas(expression must be an integral constant expression that evaluates to zero, or to a valid value for an alignment or extended alignment. 2) Equivalent to alignas(alignof(type)) 3) Equivalent to multiple alignas specifiers applied to the same declaration, one for each member of the parameter pack, which can be either type or non-type

Replacing text macros

The preprocessor supports text macro replacement. Function-like text macro replacement is also supported. Syntax #define identifier replacement-list(optional) (1) #define identifier( parameters ) replacement-list (2) #define identifier( parameters, ... ) replacement-list (3) (since C++11) #define identifier( ... ) replacement-list (4) (since C++11) #undef identifier (5) Explanation #define directives The #define directives define the identifier as macro

std::basic_istream::read

basic_istream& read( char_type* s, std::streamsize count ); Extracts characters from stream. Behaves as UnformattedInputFunction. After constructing and checking the sentry object, extracts characters and stores them into successive locations of the character array whose first element is pointed to by s. Characters are extracted and stored until any of the following conditions occurs: count characters were extracted and stored end of file condition occurs on the input sequence (i

std::future::wait_for

template< class Rep, class Period > std::future_status wait_for( const std::chrono::duration<Rep,Period>& timeout_duration ) const; (since C++11) Waits for the result to become available. Blocks until specified timeout_duration has elapsed or the result becomes available, whichever comes first. Returns value identifies the state of the result. A steady clock is used to measure the duration. This function may block for longer than timeout_duration due to scheduling or res

std::iota

Defined in header <numeric> template< class ForwardIterator, class T > void iota( ForwardIterator first, ForwardIterator last, T value ); (since C++11) Fills the range [first, last) with sequentially increasing values, starting with value and repetitively evaluating ++value. Equivalent operation: *(d_first) = value; *(d_first+1) = ++value; *(d_first+2) = ++value; *(d_first+3) = ++value; ... Parameters first, last - the range of elements to fill with sequenti

std::vector&lt;bool&gt;::reference

class reference; The std::vector<bool> specialization defines std::vector<bool>::reference as a publicly-accessible nested class. std::vector<bool>::reference proxies the behavior of references to a single bit in std::vector<bool>. The primary use of std::vector<bool>::reference is to provide an l-value that can be returned from operator[]. Any reads or writes to a vector that happen via a std::vector<bool>::reference potentially read or write to the