The priority_queue :: value_type method is a builtin function in C++ STL which represents the type of object stored as an element in a priority_queue. It acts as a synonym for the template parameter.
It has no parameters and no return value.
Below programs illustrate the above function.
The value_type is AnInt = 20 The element at the top of the priority_queue is 30.
The value_type is AString = geeks for geeks Value stored in priority queue are : ghi def abc
- Different ways to use Const with Reference to a Pointer in C++
- std::to_address in C++ with Examples
- Program to create Custom Vector Class in C++
- std::is_trivially_copy_constructible in C/C++
- Difference between Python and C++
- tgamma() method in C/C++ with Examples
- boost::type_traits::is_array Template in C++
- boost is_pointer template in C++
- Stack of Pair in C++ STL with Examples
- Modulo Operator (%) in C/C++ with Examples
- fpclassify() method in C/C++ with Examples
- Operator Overloading '<<' and '>>' operator in a linked list class
- Priority Queue of Vectors in C++ STL with Examples
- How to find the Entry with largest Value in a C++ Map
- Visibility Modes in C++ with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.