File indexing completed on 2023-03-17 10:49:31
0001 #include <map>
0002
0003 #include "DataFormats/Common/interface/SortedCollection.h"
0004
0005
0006
0007 struct Key
0008 {
0009 int i;
0010 };
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 bool operator< (Key const& a, Key const& b) { return a.i < b.i; }
0022
0023 struct V
0024 {
0025 typedef Key key_type;
0026
0027 int i;
0028 key_type k;
0029
0030 key_type id() const { return k; }
0031 };
0032
0033 struct BackwardsOrdering
0034 {
0035 typedef Key key_type;
0036 bool operator()(key_type a, V const& b) const { return b.id() < a; }
0037 bool operator()(V const& a, key_type b) const { return b < a.id(); }
0038 bool operator()(V const& a, V const& b) const { return b.id() < a.id(); }
0039 };
0040
0041 int main()
0042 {
0043 edm::SortedCollection<V> sc;
0044 std::map<Key,V> m;
0045
0046
0047
0048
0049
0050 return 0;
0051 }