operator-(reverse_iterator)

template< class Iterator > typename reverse_iterator<Iterator>::difference_type operator-( const reverse_iterator<Iterator>& lhs, const reverse_iterator<Iterator>& rhs ); (until C++11) template< class Iterator1, class Iterator2 > auto operator-( const reverse_iterator<Iterator1>& lhs, const reverse_iterator<Iterator2>& rhs ) -> decltype(rhs.base() - lhs.base()); (since C++11) Returns t

operator overloading

Customizes the C++ operators for operands of user-defined types. Syntax Overloaded operators are functions with special function names: operator op (1) operator type (2) operator new operator new [] (3) operator delete operator delete [] (4) operator "" suffix-identifier (5) (since C++11) op - any of the following 38 operators:+ - * / % ˆ & | ~ ! = < > += -= *= /= %= ˆ= &= |= << >> >>= <<= == != <= >= &&

operator

Usage declaration of an overloaded operator

Object lifetime

Every object has a lifetime, which is a runtime property: for any object, there is a moment during the execution of a program when its lifetime begins, and there is a moment when it ends. For objects of class or aggregate types that are initialized by anything other than the trivial default constructor, lifetime begins when initialization ends. For objects of class types whose destructor is not trivial, lifetime ends when the execution of the destructor begins. For all other objects (class

offsetof

Defined in header <cstddef> #define offsetof(type, member) /*implementation-defined*/ The macro offsetof expands to a constant of type std::size_t, the value of which is the offset, in bytes, from the beginning of an object of specified type to its specified member, including padding if any. If type is not a standard layout type, the behavior is undefined. If member is a static member or a member function, the behavior is undefined. The offset of the first member of a stand

Object

C++ programs create, destroy, refer to, access, and manipulate objects. An object, in C++, is a region of storage that has. size (can be determined with sizeof) alignment requirement (can be determined by alignof) storage duration (automatic, static, dynamic, thread-local) lifetime (bounded by storage duration or temporary) type value (which may be indeterminate, e.g. for default-initialized non-class types) optionally, a name Functions, references, classes and other types, name

Numerics library

The C++ numerics library includes common mathematical functions and types, as well as optimized numeric arrays and support for random number generation. Common mathematical functions The header cmath provides standard C library mathematical functions such as std::fabs, std::sqrt, and std::sin. Complex numbers Defined in header <complex> complex a complex number type (class template) Numeric arrays Defined in header <valarray> valarray numeric arrays and arr

NumericType

Specifies that the type can be used as the template argument of std::valarray. Requirements for a type T to be an NumericType: T cannot be a reference T cannot be cv-qualified If T is a class, it does not overload operator& has no pure virtual member functions (is not abstract) has a public default constructor has a public copy constructor T::T(const T&) has a public destructor has a public assignment operator T& T::operator=(const T&) or T& T::operator=

numeric

This header is part of the numeric library. Functions iota (C++11) fills a range with successive increments of the starting value (function template) accumulate sums up a range of elements (function template) inner_product computes the inner product of two ranges of elements (function template) adjacent_difference computes the differences between adjacent elements in a range (function template) partial_sum computes the partial sum of a range of elements (function te

nullptr

Syntax nullptr (since C++11) Explanation The keyword nullptr denotes the pointer literal. It is a prvalue of type std::nullptr_t. There exist implicit conversions from nullptr to null pointer value of any pointer type and any pointer to member type. Similar conversions exist for any null pointer constant, which includes values of type std::nullptr_t as well as the macro NULL. Example Demonstrates how nullptr allows forwarding via a template function. #include <cstddef> #