direct initialization

Initializes an object from explicit set of constructor arguments. Syntax T object ( arg ); T object ( arg1, arg2, ... ); (1) T object { arg }; T object { arg1, arg2, ... }; (2) (since C++11) T ( other ) T ( arg1, arg2, ... ); (3) static_cast< T >( other ) (4) new T(args, ...) (5) Class::Class() : member(args, ...) {... (6) [arg](){... (7) (since C++11) Explanation Direct initialization is performed in the following situations: 1) in

integer literal

Allows values of integer type to be used in expressions directly. Syntax An integer literal is a primary expression of the form. decimal-literal integer-suffix(optional) (1) octal-literal integer-suffix(optional) (2) hex-literal integer-suffix(optional) (3) binary-literal integer-suffix(optional) (4) (since C++14) where. decimal-literal is a non-zero decimal digit (1, 2, 3, 4, 5, 6, 7, 8, 9), followed by zero or more decimal digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)

std::regex_traits::regex_traits

regex_traits(); Default-constructs the std::regex_traits object, including default-constructing the private std::locale member or any other internal state as necessary. Parameters (none). Return value (none). Example #include <iostream> #include <regex> int main() { std::locale::global(std::locale("en_US.utf8")); std::regex_traits<char> r1; std::regex_traits<wchar_t> r2; std::cout << "The regex locale is " << r1.getloc().n

std::valarray::min

T min() const; Computes the minimum value of the elements. If there are no elements, the behavior is undefined. The function can be used only if operator< is defined for type T. Parameters (none). Return value The minimum of the elements. Example See also max returns the largest element (public member function)

std::basic_string::data

const CharT* data() const; Returns pointer to the underlying array serving as character storage. The pointer is such that the range [data(); data() + size()) is valid and the values in it correspond to the values stored in the string. The returned array is not required to be null-terminated. If empty() returns true, the pointer is a non-null pointer that should not be dereferenced. (until C++11) The returned array is null-terminated, that is, data() and c_str() perform the same func

goto statement

Transfers control unconditionally. Used when it is otherwise impossible to transfer control to the desired location using other statements. Syntax attr(optional) goto label ; Explanation The goto statement transfers control to the location specified by label. The goto statement must be in the same function as the label it is referring, it may appear before or after the label. If transfer of control exits the scope of any automatic variables (e.g. by jumping backwards to a point be

std::iterator

Defined in header <iterator> template< class Category, class T, class Distance = std::ptrdiff_t, class Pointer = T*, class Reference = T& > struct iterator; std::iterator is the base class provided to simplify definitions of the required types for iterators. Template parameters Category - the category of the iterator. Must be one of iterator category tags. T - the type of the values that can be obtained by dereferencing the iter

std::list::emplace_back

template< class... Args > void emplace_back( Args&&... args ); (since C++11) Appends a new element to the end of the container. The element is constructed through std::allocator_traits::construct, which typically uses placement-new to construct the element in-place at the location provided by the container. The arguments args... are forwarded to the constructor as std::forward<Args>(args).... No iterators or references are invalidated. Parameters args - argum

auto

Usage automatic storage duration specifier (until C++11) auto specifier (since C++11)

std::locale::combine

Defined in header <locale> template< class Facet > locale combine( const locale& other ) const; Constructs a locale object which is a copy of *this except for the facet of type Facet, which is copied from other. Return value The new, nameless, locale. Exceptions std::runtime_error if other does not implement Facet. Example #include <iostream> #include <locale> int main() { const double number = 1000.25; std::cout << "\"C\" lo