The std::map::value_comp() is a function in C++ STL. It returns a function object that compares objects of type std::map::value.
value_compare value_comp() const
Parameters: It does not accept any parameters.
Returns: This method returns a function object that compares objects of type std::map::value.
Time Complexity: O(1)
Below examples illustrate the map::value_comp() method:
Map contains following elements a = 1 b = 2 c = 3 d = 4 e = 5
Map contains following elements a = A b = B c = C d = D e = E
- Find the node whose sum with X has minimum set bits
- Salt and Pepper Noise removal using C++
- Dynamic Constructor in C++ with Examples
- C++ Stream Classes Structure
- OpenMP | Hello World program
- Odd Even Transposition Sort / Brick Sort using pthreads
- Chat application between two processes using signals and shared memory
- Find sub-arrays from given two arrays such that they have equal sum
- Count of quadruplets with given Sum | Set 2
- Intel Graphics Software Engineer Interview Experience
- OpenMP | Introduction with Installation Guide
- Equation of straight line passing through a given point which bisects it into two equal line segments
- Maximum absolute difference in an array
- Count the pairs of vowels in the given string
- Find number of unique triangles among given N triangles
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.