Templates

A template is a C++ entity that defines one of the following: a family of classes (class template), which may be nested classes a family of functions (function template), which may be member functions an alias to a family of types (alias template) (since C++11) a family of variables (variable template) (since C++14) Templates are parametrized by one or more template parameters, of three kinds: type template parameters, non-type template parameters, and template template parameters. Wh

operators (std::chrono::duration)

template< class Rep1, class Period1, class Rep2, class Period2 > typename std::common_type<duration<Rep1,Period1>, duration<Rep2,Period2>>::type constexpr operator+( const duration<Rep1,Period1>& lhs, const duration<Rep2,Period2>& rhs ); (1) template< class Rep1, class Period1, class Rep2, class Period2 > typename std::common_type<duration<Rep1,Period1>, duration<Rep2,Period2>>::type cons

std::shared_ptr::swap

void swap( shared_ptr& r ); (since C++11) Exchanges the contents of *this and r. Parameters r - smart pointer to exchange the contents with Return value (none). Exceptions noexcept specification: noexcept

std::moneypunct::moneypunct

Defined in header <locale> explicit moneypunct( std::size_t refs = 0 ); Creates a std::moneypunct facet and forwards the starting reference count refs to the base class constructor, locale::facet::facet(). Parameters refs - starting reference count

std::chrono::duration::max

static constexpr duration max(); Returns a duration with the largest possible value. If the representation rep of the duration requires some other implementation to return a maximum-length duration, std::chrono::duration_values can be specialized to return the desired value. Parameters (none). Return value returns std::chrono::duration(std::chrono::duration_values<rep>::max()). See also zero [static] returns the special duration value zero (public static member func

std::error_code::message

std::string message() const; (since C++11) Returns the message corresponding to the current error value and category. Equivalent to category().message(value()). Parameters (none). Return value The error message corresponding to the current error value and category. Exceptions (none).

std::forward_list

Defined in header <forward_list> template< class T, class Allocator = std::allocator<T> > class forward_list; (since C++11) std::forward_list is a container that supports fast insertion and removal of elements from anywhere in the container. Fast random access is not supported. It is implemented as a singly-linked list and essentially does not have any overhead compared to its implementation in C. Compared to std::list this container provides more space

std::priority_queue

Defined in header <queue> template< class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type> > class priority_queue; A priority queue is a container adaptor that provides constant time lookup of the largest (by default) element, at the expense of logarithmic insertion and extraction. A user-provided Compare can be supplied to change the ordering, e.g. using std::greater<T> would cause the smalle

std::basic_streambuf::in_avail

std::streamsize in_avail(); Returns the number of characters available in the get area. If a read position is available, effectively returns egptr() - gptr(), the size of the get area. In this case, the number of bytes returned is the number of bytes that can be extracted from the buffer without calling underflow(). If the get area is empty, calls showmanyc() to determine the number of bytes available in the associated character sequence. In this case, the value returned is the number o

std::basic_istringstream::rdbuf

std::basic_stringbuf<CharT, Traits, Allocator>* rdbuf() const; Returns pointer to the underlying raw string device object. Parameters (none). Return value Pointer to the underlying raw string device. Example