mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 11:16:29 +03:00
flat_map: add value_comp()
This commit is contained in:
committed by
Matthew Barr
parent
e37fdb240a
commit
f520599ab7
@@ -611,6 +611,21 @@ public:
|
||||
return comp();
|
||||
}
|
||||
|
||||
class value_compare {
|
||||
friend class flat_map;
|
||||
protected:
|
||||
Compare c;
|
||||
value_compare(Compare c_in) : c(c_in) {}
|
||||
public:
|
||||
bool operator()(const value_type &lhs, const value_type &rhs) {
|
||||
return c(lhs.first, rhs.first);
|
||||
}
|
||||
};
|
||||
|
||||
value_compare value_comp() const {
|
||||
return value_compare(comp());
|
||||
}
|
||||
|
||||
// Operators.
|
||||
|
||||
bool operator==(const flat_map &a) const {
|
||||
|
Reference in New Issue
Block a user