std::vector::empty

bool empty() const; Checks if the container has no elements, i.e. whether begin() == end(). Parameters (none). Return value true if the container is empty, false otherwise. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant. Example The following code uses empty to check if a std::vector<int> contains any elements: #include <vector> #include <iostream> int main() { std::vector<int> numbers;

std::unordered_map::bucket_count

size_type bucket_count() const; (since C++11) Returns the number of buckets in the container. Parameters (none). Return value The number of buckets in the container. Complexity Constant. See also bucket_size returns the number of elements in specific bucket (public member function) max_bucket_count returns the maximum number of buckets (public member function)

std::islessequal

Defined in header <cmath> bool islessequal( float x, float y ); (1) (since C++11) bool islessequal( double x, double y ); (2) (since C++11) bool islessequal( long double x, long double y ); (3) (since C++11) bool islessequal( Arithmetic x, Arithmetic y ); (4) (since C++11) 1-3) Determines if the floating point number x is less than or equal to the floating-point number y, without setting floating-point exceptions. 4) A set of overloads or a function temp

std::sinh

Defined in header <cmath> float sinh( float arg ); (1) double sinh( double arg ); (2) long double sinh( long double arg ); (3) double sinh( Integral arg ); (4) (since C++11) Computes the hyperbolic sine of arg. 4) A set of overloads or a function template accepting an argument of any integral type. Equivalent to 2) (the argument is cast to double). Parameters arg - value of a floating-point or Integral type Return value If n

std::enable_shared_from_this

Defined in header <memory> template< class T > class enable_shared_from_this; (since C++11) std::enable_shared_from_this allows an object t that is currently managed by a std::shared_ptr named pt to safely generate additional std::shared_ptr instances pt1, pt2, ... that all share ownership of t with pt. Inheriting from std::enable_shared_from_this<T> provides the type T with a member function shared_from_this. If an object t of type T is managed by a std::shared

std::deque::front

reference front(); const_reference front() const; Returns a reference to the first element in the container. Calling front on an empty container is undefined. Parameters (none). Return value reference to the first element. Complexity Constant. Notes For a container c, the expression c.front() is equivalent to *c.begin(). Example The following code uses front to display the first element of a std::deque<char>: #include <deque> #include <iostream>

Namespaces

Namespaces provide a method for preventing name conflicts in large projects. Symbols declared inside a namespace block are placed in a named scope that prevents them from being mistaken for identically-named symbols in other scopes. Multiple namespace blocks with the same name are allowed. All declarations within those blocks are declared in the named scope. Syntax namespace ns_name { declarations } (1) inline namespace ns_name { declarations } (2) (since C++11) namespace { decl

std::isxdigit(std::locale)

Defined in header <locale> template< class charT > bool isxdigit( charT ch, const locale& loc ); Checks if the given character is classified as a hexadecimal digit by the given locale's std::ctype facet. Parameters ch - character loc - locale Return value Returns true if the character is classified as a hexadecimal digit, false otherwise. Possible implementation template< class charT > bool isxdigit( charT ch, const std::locale& l

Default constructors

A default constructor is a constructor which can be called with no arguments (either defined with an empty parameter list, or with default arguments provided for every parameter). A type with a public default constructor is DefaultConstructible. Syntax ClassName ( ) ; (1) ClassName :: ClassName ( ) body (2) ClassName() = delete ; (3) (since C++11) ClassName() = default ; (4) (since C++11) Explanation 1) Declaration of a default constructor. 2) Definition of the

private

Usage private access specifier