The unordered_multiset::get_allocator() function is a STL function in C++ which is used to include unorder_multiset header file in program. This function gets the stored allocator object and returns the allocator object which is used to construct the container. It is a public member function.
allocator_type get_allocator() const;
Here allocator_type is the type of the allocator which is used by the container.
Parameters: It does not accepts any parameter.
Return Value: It returns the allocator type.
Below program illustrate get_allocator method in C++ STL:
allocator is : true
Complexity: It takes constant time of complexity to perform operation.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- std::sort() in C++ STL
- Kruskal's Minimum Spanning Tree using STL in C++
- Dijkstra’s shortest path algorithm using set in STL
- Dijkstra's Shortest Path Algorithm using priority_queue of STL
- Prim's algorithm using priority_queue in STL
- unordered_map in C++ STL
- fill() and fill_n() functions in C++ STL
- std::transform() in C++ STL (Perform an operation on all elements)
- Count number of unique Triangles using STL | Set 1 (Using set)
- Permutations of a given string using STL
- Algorithm Library | C++ Magicians STL Algorithm
- Array algorithms in C++ STL (all_of, any_of, none_of, copy_n and iota)
- Iterators in C++ STL
- accumulate() and partial_sum() in C++ STL : numeric header
- std::partition in C++ STL
- Merge operations using STL in C++ | merge(), includes(), set_union(), set_intersection(), set_difference(), ., inplace_merge,
- Heap in C++ STL | make_heap(), push_heap(), pop_heap(), sort_heap(), is_heap, is_heap_until()
- numeric header in C++ STL | Set 2 (adjacent_difference(), inner_product() and iota())
- Counts of distinct consecutive sub-string of length two using C++ STL
- Graph implementation using STL for competitive programming | Set 1 (DFS of Unweighted and Undirected)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.