std::valarray::sum

T sum() const; Computes the sum of the elements. The function can be used only if operator+= is defined for type T. If the std::valarray is empty, the behavior is undefined. The order in which the elements are processed by this function is unspecified. Parameters (none). Return value The sum of the elements. Example #include <iostream> #include <valarray> int main() { std::valarray<int> a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; std::cout << a.sum(

std::cauchy_distribution::param

param_type param() const; (1) (since C++11) void param( const param_type& params ); (2) (since C++11) Manages the associated distribution parameter set. 1) Returns the associated parameter set. 2) Sets the associated parameter set to params. Parameters params - new contents of the associated parameter set Return value 1) The associated parameter set. 2) (none). Complexity Constant.

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

std::istreambuf_iterator::operators (int)

istreambuf_iterator& operator++(); (1) /* unspecified */ operator++(int); (2) Advances the iterator by calling sbuf_->sbumpc() where sbuf_ is the stored pointer to the stream buffer. The behavior is undefined if the iterator is end-of-stream iterator. Parameters (none). Return value 1) *this. 2) An unspecified struct proxy holding the current character obtained via operator*() for later retrieval. proxy is implicitly convertible to CharT. proxy also holds the valu

std::enable_if

Defined in header <type_traits> template< bool B, class T = void > struct enable_if; (since C++11) If B is true, std::enable_if has a public member typedef type, equal to T; otherwise, there is no member typedef. This metafunction is a convenient way to leverage SFINAE to conditionally remove functions from overload resolution based on type traits and to provide separate function overloads and specializations for different type traits. std::enable_if can be used as an

ValueSwappable

Two objects of this type can be dereferenced and the resulting values can be swapped using unqualified function call swap() in the context where both std::swap and the user-defined swap()s are visible. Requirements Type T is ValueSwappable if. 1) Type T satisfies the Iterator requirements 2) For any dereferencable object x of type T (that is, any value other than the end iterator), *x satisfies the Swappable requirements. Many standard library functions expect their arguments to satisfy Va

std::showbase

Defined in header <ios> std::ios_base& showbase( std::ios_base& str ); (1) std::ios_base& noshowbase( std::ios_base& str ); (2) 1) enables the showbase flag in the stream str as if by calling str.setf(std::ios_base::showbase). 2) disables the showbase flag in the stream str as if by calling str.unsetf(std::ios_base::showbase). This is an I/O manipulator, it may be called with an expression such as out << std::showbase for any out of type std::bas

std::valarray::max

T max() const; Computes the maximum 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 maximum of the elements. Example See also min returns the smallest element (public member function)

std::vector::at

reference at( size_type pos ); const_reference at( size_type pos ) const; Returns a reference to the element at specified location pos, with bounds checking. If pos not within the range of the container, an exception of type std::out_of_range is thrown. Parameters pos - position of the element to return Return value Reference to the requested element. Exceptions std::out_of_range if !(pos < size()). Complexity Constant. See also operator[] acces

std::vector::end

iterator end(); const_iterator end() const; const_iterator cend() const; (since C++11) Returns an iterator to the element following the last element of the container. This element acts as a placeholder; attempting to access it results in undefined behavior. Parameters (none). Return value Iterator to the element following the last element. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant. See also begin