unordered_multiset::key_eq

Gets the stored comparison function object.

Pred key_eq() const;

Remarks

The member function returns the stored comparison function object.

Example

 

// std_tr1__unordered_set__unordered_multiset_key_eq.cpp 
// compile with: /EHsc 
#include <unordered_set> 
#include <iostream> 
 
typedef std::unordered_multiset<char> Myset; 
int main() 
    { 
    Myset c1; 
 
    Myset::key_equal cmpfn = c1.key_eq(); 
    std::cout << "cmpfn('a', 'a') == " 
        << std::boolalpha << cmpfn('a', 'a') << std::endl; 
    std::cout << "cmpfn('a', 'b') == " 
        << std::boolalpha << cmpfn('a', 'b') << std::endl; 
 
    return (0); 
    } 
 
cmpfn('a', 'a') == true
cmpfn('a', 'b') == false

Requirements

Header: <unordered_set>

Namespace: std

See Also

Reference

<unordered_set>

unordered_multiset Class

Other Resources

<unordered_set> Members