C++ Library –

C++ Library – <unordered_map> ”; Previous Next Introduction to unordered_map Unordered map is dictionary like data structure. It is a sequence of (key, value) pair, where only single value is associated with each unique key. It is often referred as associative array. It enables fast retrieval of individual elements based on their keys. It also implements the direct access operator(subscript operator[]) which allows for direct access of the mapped value using its key value as argument. Unordered map does not sort its element in any particular order with respect to either their key or mapped values, instead organizes into buckets depending on their hash values to allow for fast access to individual elements directly by their key values. Unordered map performs better than map while accessing individual elements by their keys. But for range iteration their performance is considerably low. Definition Below is definition of std::unordered_map from <unordered_map> header file template < class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, class Alloc = allocator< pair<const Key,T> > > class unordered_map; Parameters Key − Type of the key. T − Type of the mapped values. Hash − A unary function object type which takes an object of type key type as argument and returns a unique value of type size_t based on it. Pred − A binary predicate that which two arguments of the key type and returns a bool. Alloc − Type of the allocator object. T may be substituted by any other data type including user-defined type. Member types Following member types can be used as parameters or return type by member functions. Sr.No. Member types Definition 1 key_type Key (First parameter of the template) 2 mapped_type T (Second parameter of the template) 3 value_type pair<const key_type,mapped_type> 4 hasher The third template parameter (defaults to: hash<key_type>) 5 key_equal The fourth template parameter (defaults to: equal_to<key_type>) 6 allocator_type Alloc (Fifth parameter of the template) 7 reference value_type& 8 const_reference const value_type& 9 pointer allocator_traits<Alloc>::pointer 10 const_pointer allocator_traits<Alloc>::const_pointer 11 iterator A forward iterator to value_type value_type 12 const_iterator A forward iterator to const value_type value_type 13 local_iterator A forward iterator to value_type 14 const_local_iterator A forward iterator to const value_type 15 difference_type ptrdiff_t 16 size_type size_t Functions from <unordered_map> Below is list of all methods from <unordered_map> header. Constructors Sr.No. Method & Description 1 unordered_map::unordered_map default constructor Constructs an empty unordered_map with zero elements. 2 unordered_map::unordered_map copy constructor Constructs an unordered_map with copy of each elements present in existing unordered_map. 3 unordered_map::unordered_map move constructor Constructs an unordered_map with the contents of other using move semantics. 4 unordered_map::unordered_map range constructor Constructs an unordered_map with as many elements as in range of first to last. 5 unordered_map::unordered_map initializer_list constructor Constructs an unordered_map from initialize list. Destructor Sr.No. Method & Description 1 unordered_map::~unordered_map Destroys unordered_map object by deallocating it”s memory. Member functions Sr.No. Method & Description 1 unordered_map::at Returns a reference to the mapped value associated with key k. 2 unordered_map::begin container iterator Returns an iterator which refers to the first element of the map. 3 unordered_map::begin bucket iterator Returns an iterator pointing to the first element in one of its buckets. 4 unordered_map::bucket Returns the bucket number where element with key k is located. 5 unordered_map::bucket_count Returns the number of buckets in unordered_map container. 6 unordered_map::bucket_size Returns the number of elements presents in the nth bucket. 7 unordered_map::cbegin container iterator Returns a constant iterator which refers to the first element of the unordered_map. 8 unordered_map::cbegin bucket iterator Returns a constant iterator pointing to the first element in one of its buckets. 9 unordered_map::cend container iterator Returns a constant iterator which points to past-the-end element of the unordered_map. 10 unordered_map::cend bucket iterator Returns a constant iterator which points to past-the-end element in one of its buckets. 11 unordered_map::clear Destroys the unordered_map by removing all elements and sets the size of unordered_map to zero. 12 unordered_map::count Returns the number of mapped values associated with key k. 13 unordered_map::emplace Extends container by inserting new element. 14 unordered_map::emplace_hint Inserts a new element in unordered_map using hint as a position for element. 15 unordered_map::empty Tests whether unordered_map is empty or not. 16 unordered_map::end container iterator Returns an iterator which points to past-the-end element in the unordered_map. 17 unordered_map::end bucket iterator Returns an iterator which points to past-the-end element in one of its buckets. 18 unordered_map::equal Returns range of elements that matches specific key. 19 unordered_map::erase position version Removes single element of the unordered_map from position. 20 unordered_map::erase key version Removes mapped value associated with key k. 21 unordered_map::erase range version Removes range of element from the the unordered_map. 22 unordered_map::find Finds an element associated with key k. 23 unordered_map::get_allocator Returns an allocator associated with unordered_map. 24 unordered_map::hash_function Calculates the hash function object used by the unordered_map container. 25 unordered_map::insert Extends container by inserting new element in unordered_map. 26 unordered_map::insert move version Extends container by inserting new element in unordered_map. 27 unordered_map::insert hint version Extends conta iner by inserting new element in unordered_map. 28 unordered_map::insert move and hint version Extends unordered_map by inserting new element. 29 unordered_map::insert range version Extends container by inserting new elements in the unordered_map. 30 unordered_map::insert initializer_list version Extends map by inserting new element from initializer list. 31 unordered_map::key_eq Returns the function that compares keys for equality. 32 unordered_map::load_factor Returns the current load factor of the unordered_map container. 33 unordered_map::max_bucket_count Returns the maximum number of buckets that the unordered_map container can have. 34 unordered_map::max_load_factor get version Returns the current maximum load factor for the unordered_map container. 35 unordered_map::max_load_factor set version Assigns new load factor for the unordered_map container. 36 unordered_map::max_size Returns the maximum number of elements can be held by unordered_map. 37 unordered_map::operator= copy version Assigns new contents to the unordered_map by replacing old ones and modifies size if necessary. 38 unordered_map::operator= move version Move the contents of one unordered_map into another and modifies size if necessary. 39 unordered_map::operator= initializer_list version Copy elements from initializer list to unordered_map. 40 unordered_map::operator[] If key k matches an element in

C++ Library –

C++ Library – <algorithm> ”; Previous Next Introduction to algorithm The algorithm library provides several functions that can be used for a variety of purposes, for instance searching, sorting, counting, manipulating and so on. These functions operate on ranges of elements and the range is defined as [first, last). Functions from <algorithm> Below is list of all methods from <algorithm> header. Member functions Sr.No. Method & Description 1 algorithm::adjacent_find() Finds the first occurrence of two consecutive elements that are identical and returns an iterator pointing to the first element if identical element exists consecutively otherwise returns an iterator pointing to the last element. 2 algorithm::adjacent_find() Finds the first occurrence of two consecutive elements that are identical and returns an iterator pointing to the first element if identical element exists consecutively otherwise returns an iterator pointing to the last element. 3 algorithm::all_of() Returns true if predicate returns true for all the elements in the range of first to last. 4 algorithm::any_of() Returns true if predicate returns true for any of the elements in the range of first to last. 5 algorithm::binary_search() Tests whether value exists in sorted sequence or not. 6 algorithm::binary_search() Tests whether value exists in sorted sequence or not. 7 algorithm::copy() Copies a range of elements to a new location. 8 algorithm::copy_backward() Copies a range of elements to a new location in backward order. 9 algorithm::copy_if() Copies a range of elements to a new location if predicate returns true for value. 10 algorithm::copy_n() Copies first n numbers to a new location. 11 algorithm::count() Returns the number of occurrences of value in range. 12 algorithm::count_if() Returns the number of occurrences of value from range that satisfies condition. 13 algorithm::equal() Tests whether two sets of element are equal or not. 14 algorithm::equal() Tests whether two sets of element are equal or not. 15 algorithm::equal_range() Returns a range of element that matches specific key. 16 algorithm::equal_range() Returns a range of element that matches specific key. 17 algorithm::fill() Assigns certain value to a range of elements. 18 algorithm::fill_n() Assigns value to the first n elements of the sequence pointed by first. 19 algorithm::fill_n() Assigns value to the first n elements of the sequence pointed by first. 20 algorithm::find() Finds the first occurrence of the element. 21 algorithm::find_end() Finds the last occurrence of the element. 22 algorithm::find_end() Finds the last occurrence of the element. 23 algorithm::find_first_of() Returns an iterator to the first element in the range of (first1,last1) that matches any of the elements in first2,last2. 24 algorithm::find_first_of() Returns an iterator to the first element in the range of (first1,last1) that matches any of the elements in first2,last2. 25 algorithm::find_if() Finds the first occurrence of the element that satisfies the condition. 26 algorithm::find_if_not() Finds the last occurrence of the element that satisfies the condition. 27 algorithm::for_each() Applies provided function on each element of the range. 28 algorithm::generate() Assigns the value returned by successive calls to gen to the elements in the range of first to last. 29 algorithm::generate_n() Assigns the value returned by successive calls to gen to the first n elements of the sequence pointed by the first. 30 algorithm::generate_n() Assigns the value returned by successive calls to gen to the first n elements of the sequence pointed by the first. 31 algorithm::includes() Test whether first set is subset of another or not. 32 algorithm::includes() Test whether first set is subset of another or not. 33 algorithm::inplace_merge() Merges two sorted sequence in-place. 34 algorithm::inplace_merge() Merges two sorted sequence in-place. 35 algorithm::is_heap() Tests whether given sequence is max heap or not. 36 algorithm::is_heap() Tests whether given sequence is max heap or not. 37 algorithm::is_heap_until() Finds the first element from the sequence which violates the max heap condition. 38 algorithm::is_heap_until() Finds the first element from the sequence which violates the max heap condition. 39 algorithm::is_partitioned() Tests whether range is partitioned or not. 40 algorithm::is_permutation() Tests whether a sequence is permutation of other or not. 41 algorithm::is_permutation() Tests whether a sequence is permutation of other or not. 42 algorithm::is_sorted() Tests whether range is sorted or not. 43 algorithm::is_sorted() Tests whether range is sorted or not. 44 algorithm::is_sorted_until() Finds first unsorted element from the sequence. 45 algorithm::is_sorted_until() Finds first unsorted element from the sequence. 46 algorithm::iter_swap() Exchange values of objects pointed by two iterators. 47 algorithm::lexicographical_compare() Tests whether one range is lexicographically less than another or not. 48 algorithm::lexicographical_compare() Tests whether one range is lexicographically less than another or not. 49 algorithm::lower_bound() Finds the first element not less than the given value. 50 algorithm::lower_bound() Finds the first element not less than the given value. Print Page Previous Next Advertisements ”;

C++ Library –

C++ Library – <stack> ”; Previous Next Introduction Stack is a data structure designed to operate in LIFO (Last in First out) context. In stack elements are inserted as well as get removed from only one end. Stack class is container adapter. Container is an objects that hold data of same type. Stack can be created from different sequence containers. If container is not provided it uses default deque container. Container adapters do not support iterators therefore we cannot use them for data manipulation. However they support push() and pop() member functions for data insertion and removal respectively. Definition Below is definition of std::stack from <stack> header file template <class T, class Container = deque<T> > class stack; Parameters T − Type of the element contained. T may be substituted by any other data type including user-defined type. Container − Type of the underlying container object. Member types Following member types can be used as parameters or return type by member functions. Sr.No. Member types Definition 1 value_type T (First parameter of the template) 2 container_type Second parameter of the template 3 size_type size_t 4 reference value_type& 5 const_reference const value_type& Functions from <stack> Below is list of all methods from <stack> header. Constructors Sr.No. Method & Description 1 stack::stack default constructor Constructs an empty stack object, with zero elements. 2 stack::stack copy constructor Constructs a stack with copy of each elements present in another stack. 3 stack::stack move constructor Constructs a stack with the contents of other using move semantics. Destructor Sr.No. Method & Description 1 stack::~stack Destroys stack by deallocating container memory. Member functions Sr.No. Method & Description 1 stack::emplace Constructs and inserts new element at the top of stack. 2 stack::empty Tests whether stack is empty or not. 3 stack::operator= copy version Assigns new contents to the stack by replacing old ones. 4 stack::operator= move version Assigns new contents to the stack by replacing old ones. 5 stack::pop Removes top element from the stack. 6 stack::push copy version Inserts new element at the top of the stack. 7 stack::push move version Inserts new element at the top of the stack. 8 stack::size Returns the total number of elements present in the stack. 9 stack::swap Exchanges the contents of stack with contents of another stack. 10 stack::top Returns a reference to the topmost element of the stack. Non-member overloaded functions Sr.No. Method & Description 1 operator== Tests whether two stacks are equal or not. 2 operator!= Tests whether two stacks are equal or not. 3 operator< Tests whether first stack is less than other or not. 4 operator<= Tests whether first stack is less than or equal to other or not. 5 operator> Tests whether first stack is greater than other or not. 6 operator>= Tests whether first stack is greater than or equal to other or not. 7 swap Exchanges the contents of two stack. Print Page Previous Next Advertisements ”;

C++ Library –

C++ Library – <iterator> ”; Previous Next Introduction It is a pointer-like object that can be incremented with ++, dereferenced with *, and compared against another iterator with != Categories category properties valid expressions all categories copy-constructible, copy-assignable and destructible X b(a); b = a; It can be incremented ++a a++ Random Access Bidirectional Forward Input It supports equality/inequality comparisons a == b a != b It can be dereferenced as an rvalue *a a->m Output It can be dereferenced as an lvalue (only for mutable iterator types) *a = t *a++ = t default-constructible X a; X() Multi-pass: neither dereferencing nor incrementing affects dereferenceability { b = a; *a++; *b; } It can be decremented –a a– *a– It supports arithmetic operators + and – a + n n + a a – n a – b It supports inequality comparisons ( <, >, <= and >=) between iterators a < b a > b a <= b a >= b It supports compound assignment operations += and -= a += n a -= n It supports offset dereference operator ([]) a[n] Functions Sr.No. Functions & Description 1 advance It advances the iterator it by n element positions. 2 distance It returns distance between iterators. 3 begin It is used to begin an iterator. 4 end It is used to end an iterator. 5 prev It is used to get iterator to previous element. 6 next It is used to get iterator to next element. Iterator generators Sr.No. Iterator generators & Description 1 back_inserter It constructs back insert iterator. 2 inserter It constructs insert iterator 3 make_move_iterator It construct move iterators. Classes Sr.No. Classes & Description 1 iterator It iterators base class. 2 iterator_traits It is an iterator traits. Predefined iterators Sr.No. Predefined iterators & Description 1 reverse_iterator It is a reverse iterator. 2 move_iterator It is a move iterator. 3 back_insert_iterator It is a back insert iterator. 4 front_insert_iterator It is a front insert iterator. 5 insert_iterator It is used to insert an iterator. 6 istream_iterator It is an input stream iterator. 7 ostream_iterator It is an output stream iterator. 8 istreambuf_iterator It is an input stream buffer iterator. 7 ostreambuf_iterator It is an output stream buffer iterator. Category tags Sr.No. Category tags & Description 1 input_iterator_tag Input iterator category. 2 output_iterator_tag output iterator category. 3 forward_iterator_tag Forward iterator category. 4 bidirectional_iterator_tag Bidirectional iterator category. 5 random_access_iterator_tag Random-access iterator category. Print Page Previous Next Advertisements ”;

C++ Library –

C++ Library – <sstream> ”; Previous Next Introduction It is a string stream for header. Class Templates Following are the Class Templates for sstram. Sr.No Class Templates & Definition 1 basic_istringstream It is an input string stream 2 basic_ostringstream It is an output string stream 3 basic_stringstream It is a basic string steam 4 basic_stringbuf It is a string stream buffer Wide characters Following are the Wide characters for sstram. Sr.No Wide characters & Definition 1 wistringstream It is an input string stream 2 wostringstream It is an output string stream 3 wstringstream It is a basic string steam 4 wstringbuf It is a string stream buffer Print Page Previous Next Advertisements ”;

C++ Library –

C++ Library – <locale> ”; Previous Next Introduction It is a localization library and a set of features that are culture-specific, which can be used by programs to be more portable internationally. Declaration Following is the declaration for std::locale. class locale; C++11 class locale; Functions Sr.No. Function & description 1 use_facet It is used to access facet of locale. 2 has_facet It is used to check if locale has facet. Convenience interfaces Sr.No. Interface & description 1 isspace It checks if character is a white-space. 2 isprint It checks if character is printable. 3 iscntrl It checks if character is a control character. 4 isupper It checks if character is uppercase letter. 5 islower It checks if character is lowercase letter. 6 isalpha It checks if character is alphabetic. 7 isdigit It checks if character is decimal digit. 8 ispunct It checks if character is a punctuation character. 9 isxdigit It checks if character is hexadecimal digit. 10 isalnum It checks if character is alphanumeric. 11 isgraph It checks if character has graphical representation. 12 isblank It checks if character is blank. Standard facets Sr.No. Standard facet & description 1 ctype It is a character type facet. 2 ctype_byname It is a character type facet. 3 codecvt It is used to convert codeset facet. 4 codecvt_byname It is used to convert codeset facet. 5 num_get It is a facet to parse numeric values. 6 num_put It is a facet to format numeric values. 7 numpunct It is a numeric punctuation facet. 8 numpunct_byname It is a numeric punctuation facet. 9 collate It is a facet to compare and hash strings. 10 collate_byname It is a facet to compare and hash strings. 11 time_get It is a facet to parse dates and times. 12 time_get_byname It is a facet to parse dates and times. 13 time_put It is a facet to format dates and times. 14 time_put_byname It is a facet to format dates and times. 15 money_get It is a facet to parse monetary expressions. 16 money_put It is a facet to format monetary expressions. 17 moneypunct It is a monetary punctuation facet. 18 moneypunct_byname It is a monetary punctuation facet. 19 messages It is a facet to access message catalogs. 20 messages_byname It is a facet to access message catalogs. Class Sr.No. Class & description 1 locale It is a locale class. Print Page Previous Next Advertisements ”;

C++ Library –

C++ Library – <valarray> ”; Previous Next Introduction It is a library for arrays of numeric values and this header declares the valarray class and its auxiliary classes and functions. Classes Sr.No. Class & description 1 valarray It is a valarray class. 2 slice It is a valarray slice selector. 3 gslice It is a valarray generalized slice selector. Global functions Sr.No. Global function & description 1 abs It computes absolute value of valarray elements. 2 acos It computes arc cosine of valarray elements. 3 asin It computes arc sine of valarray elements. 4 atan It computes arc tangent of valarray elements. 5 atan2 It computes atan2 of valarray elements. 6 cos It computes cosine of valarray elements. 7 cosh It computes hyperbolic cosine of valarray elements. 8 exp It computes exponential of valarray element. 9 log It computes natural logarithm of valarray elements. 10 log10 It computes common logarithm of valarray elements. 11 pow It computes power of valarray elements. 12 sin It computes sine of valarray elements. 13 sinh It computes hyperbolic sine of valarray elements. 14 sqrt It computes square root of valarray elements. 15 tan It computes tangent of valarray elements. 16 tanh It computes hyperbolic tangent of valarray elements. Print Page Previous Next Advertisements ”;

C++ Library –

C++ Library – <queue> ”; Previous Next Introduction to queue Queue is a data structure designed to operate in FIFO (First in First out) context. In queue elements are inserted from rear end and get removed from front end. Queue class is container adapter. Container is an objects that hold data of same type. Queue can be created from different sequence containers. Container adapters do not support iterators therefore we cannot use them for data manipulation. However they support push() and pop() member functions for data insertion and deletion respectively. Definition Below is definition of std::queuer from <queue> header file template <class T, class Container = deque<T> > class queue; Parameters T − Type of the element contained. T may be substituted by any other data type including user-defined type. Container − Type of the underlying container object. Member types Following member types can be used as parameters or return type by member functions. Sr.No. Member types Definition 1 value_type T (First parameter of the template) 2 container_type Second parameter of the template 3 size_type size_t 4 reference value_type& 5 const_reference const value_type& 6 difference_type ptrdiff_t Functions from <queue> Below is list of all methods from <queue> header. Constructors Sr.No. Method & Description 1 queue::queue Constructs an empty queue object, with zero elements. Destructor Sr.No. Method & Description 1 queue::~queue Destroys queue by deallocating container memory. Member functions Sr.No. Method & Description 1 queue::back Returns a reference to the last element of queue. 2 queue::emplace Constructs and inserts new element at the end of queue. 3 queue::empty Tests whether queue is empty or not. 4 queue::front Returns a reference to the first element of the queue. 5 queue::operator= Assigns new contents to the queue by replacing old ones. 6 queue::pop Removes front element of the queue. 7 queue::push Inserts new element at the end of queue. 8 queue::size Returns the total number of elements present in the queue. 9 queue::swap Exchanges the contents of queue with contents of another queue. Non-member overloaded functions Sr.No. Method & Description 1 operator== Tests whether two queues are equal or not. 2 operator!= Tests whether two queues are equal or not. 3 operator< Tests whether first queue is less than other or not. 4 operator<= Tests whether first queue is less than or equal to other or not. 5 operator> Tests whether first queue is greater than other or not. 6 operator>= Tests whether first queue is greater than or equal to other or not. Print Page Previous Next Advertisements ”;

C++ Library –

C++ Library – <list> ”; Previous Next Introduction List is a popularly used sequence container. Container is an object that holds data of same type. List container is implemented as doubly linked-list, hence it provides bidirectional sequential access to it”s data. List doesn”t provide fast random access, it only supports sequential access in both directions. List allows insertion and deletion operation anywhere within a sequence in constant time. Elements of list can be scattered in different chunks of memory. Container stores necessary information to allow sequential access to it”s data. Lists can shrink or expand as needed from both ends at run time. The storage requirement is fulfilled automatically by internal allocator. Zero sized lists are also valid. In that case list.begin() and list.end() points to same location. But behavior of calling front() or back() is undefined. Definition Below is definition of std::list from <list> header file template < class T, class Alloc = allocator<T> > class list; Parameters T − Type of the element contained. T may be substituted by any other data type including user-defined type. Alloc − Type of allocator object. By default, the allocator class template is used, which defines the simplest memory allocation model and is value-independent. Member types Following member types can be used as parameters or return type by member functions. Sr.No. Member types Definition 1 value_type T (First parameter of the template) 2 allocator_type Alloc (Second parameter of the template) 3 reference value_type& 4 const_reference const value_type& 5 pointer value_type* 6 const_pointer const value_type* 7 iterator a random access iterator to value_type 8 const_iterator a random access iterator to const value_type 9 reverse_iterator std::reverse_iterator <iterator> 10 const_reverse_iterator std::reverse_iterator <const_iterator> 11 size_type size_t 12 difference_type ptrdiff_t Functions from <list> Below is list of all methods from <list> header. Constructors Sr.No. Method & Description 1 list::list default constructor Constructs an empty list with zero elements. 2 list::list fill constructor Constructs a new list with n elements and assigns val to each element of list. 3 list::list fill constructor Constructs a new list with n elements and assign zero value to each element of list. 4 list::list range constructor Constructs a list with as many elements as in range of first to last. 5 list::list copy constructor Constructs a list with copy of each elements present in existing list. 6 list::list move constructor Constructs a list with the contents of other using move semantics. 7 list::list initializer list constructor Constructs a list with the contents of other using move semantics. Destructor Sr.No. Method & Description 1 list::~list Destroys list object by deallocating it”s memory. Member functions Sr.No. Method & Description 1 list::assign range version Assigns new value to list by replacing old ones. 2 list::assign fill version Assigns new values to list by replacing old ones. 3 list::assign initializer list version Assigns new values to list by replacing old ones. 4 list::back Returns a reference to the last element of the list. 5 list::begin Returns a random access iterator which points to the first element of the list. 6 list::cbegin Returns a constant random access iterator which points to the beginning of the list. 7 list::cend Returns a constant random access iterator which points to the end of the list. 8 list::clear Destroys the list by removing all elements from the list and sets size of list to zero. 9 list::crbegin Returns a constant reverse iterator which points to the last element of the list. 10 list::crend Returns a constant reverse iterator which points to the theoretical element preceding the first element in the list. 11 list::emplace Extends list by inserting new element at a given position. 12 list::emplace_back Inserts new element at the end of list and increases size of list by one. 13 list::emplace_front Inserts new element at the beginning of the list and increases size of list by one. 14 list::empty Tests whether list is empty or not. 15 list::end Returns a random access iterator which points to the last element of the list. 16 list::erase position version Removes single element from the the list. 17 list::erase range version Removes range of element from the the list. 18 list::front Returns a reference to the first element of the list. 19 list::get_allocator Returns an allocator associated with list 20 list::insert single element version Extends iterator by inserting new element at position in list. 21 list::insert fill version Extends list by inserting new elements in the container. 22 list::insert range version Extends list by inserting new elements in the container. 23 list::insert move version Extends list by inserting new element in the container. 24 list::insert initializer list version Extends list by inserting new elements in the container 25 list::max_size Returns the maximum number of elements can be held by list. 26 list::merge Merges two sorted lists into one. 27 list::merge compare function Merges two sorted lists into one. 28 list::merge move version Merges two sorted lists into one by using move semantics. 29 list::merge compare function move version Merges two sorted lists into one by using move semantics. 30 list::operator= copy version Assigns new contents to the list by replacing old ones. 31 list::operator= move version Assign new contents to the list by replacing old ones. 32 list::operator= initializer list version Assign new contents to the list by replacing old ones. 33 list::pop_back Removes last element from list. 34 list::pop_front Removes first element from list. 35 list::push_back Inserts new element at the end of list. 36 list::push_back move version Inserts new element at the end of list. 37 list::push_front Inserts new element at the beginning of list. 38 list::push_front move version Inserts new element at the beginning of list. 39 list::rbegin Returns a reverse iterator which points to the last element of the list. 40 list::remove removes element(s) from the list that matches the value. 41 list::remove_if removes elements from the list that fulfills the condition. 42 list::rend Returns a reverse iterator which points to the reverse end of the list. 43 list::resize Changes the size of list. 44 list::resize

C++ Library –

C++ Library – <tuple> ”; Previous Next Introduction These are objects that pack elements of -possibly- different types together in a single object, just like pair objects do for pairs of elements, but generalized for any number of elements. It is closely related to the pair class (defined in header ): Tuples can be constructed from pairs, and pairs can be treated as tuples for certain purposes. Helper classes Sr.No. Helper classe & description 1 tuple_size It contains the information about tuple size. 2 tuple_element It contains the information about tuple element type. Member functions Sr.No. Member function & description 1 (constructor) It is a construct tuple. 2 tuple::operator= It is a tuple operator. 3 tuple::swap It swaps content. Object creation Sr.No. Object creation & description 1 make_tuple It constructs tuple. 2 forward_as_tuple It forward as tuple. 3 tie It contains tie arguments. 4 tuple_cat It concatenate tuples. Element access Sr.No. Element access & description 1 get It is used to get element. Non-member function Sr.No. Non-member function overload & description 1 relational operators (tuple) It contains relational operators for tuple. Objects Sr.No. Object & description 1 ignore It ignores assignment. Print Page Previous Next Advertisements ”;