📄 sequenceofpairscompare.h
字号:
#ifndef SEQUENCE_OF_PAIRS_COMPARE_H#define SEQUENCE_OF_PAIRS_COMPARE_Hnamespace oxsemi{ template <class T> class SequenceOfPairsCompare { public: /** Comparison function for sorting */ bool operator()(const T& lhs, const T& rhs) const { return keyLess(lhs.first, rhs.first); } /** Comparison function for lookups, first form */ bool operator()(const T& lhs, const typename T::first_type& k) const { return keyLess(lhs.first, k); } /** Comparison function for lookups, second form */ bool operator()(const typename T::first_type& k, const T& rhs) const { return keyLess(k, rhs.first); } private: bool keyLess(const typename T::first_type& k1, const typename T::first_type& k2) const { return k1 < k2; } };}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -