# | Line 84 | Line 84 | namespace oopse { | |
---|---|---|
84 | return tuple4<T1,T2,T3,T4>( t1, t2, t3, t4 ); | |
85 | } | |
86 | ||
87 | + | template<class T1, class T2, class T3> |
88 | + | inline bool operator < (const tuple3<T1, T2, T3>& t1, const tuple3<T1, T2, T3>& t2) { |
89 | ||
90 | + | return t1.first < t2.first |
91 | + | || (!(t2.first < t1.first) && t1.second < t2.second) |
92 | + | || (!(t2.first < t1.first) && !(t2.second < t2.second) && t1.third < t2.third); |
93 | + | } |
94 | + | |
95 | + | |
96 | + | inline bool operator < (const tuple3<int, int, std::vector<std::string> >& t1, const tuple3<int, int, std::vector<std::string> >& t2) { |
97 | + | |
98 | + | if (t1.first < t2.first) |
99 | + | return true; |
100 | + | else { |
101 | + | if (t1.first > t2.first) |
102 | + | return false; |
103 | + | |
104 | + | if (t1.second < t2.second) |
105 | + | return true; |
106 | + | else |
107 | + | if (t1.second > t2.second) |
108 | + | return false; |
109 | + | |
110 | + | return true; |
111 | + | } |
112 | + | } |
113 | + | |
114 | + | template<class T1, class T2, class T3, class T4> |
115 | + | inline bool operator < (const tuple4<T1, T2, T3, T4>& t1, const tuple4<T1, T2, T3, T4>& t2) { |
116 | + | |
117 | + | return t1.first < t2.first |
118 | + | || (!(t2.first < t1.first) && t1.second < t2.second) |
119 | + | || (!(t2.first < t1.first) && !(t2.second < t2.second) && t1.third < t2.third) |
120 | + | ||(!(t2.first < t1.first) && !(t2.second < t2.second) && !(t2.third < t1.third) && t1.fourth < t2.fourth); |
121 | + | } |
122 | typedef tuple3<int, int, int> IntTuple3; | |
123 | typedef tuple4<int, int, int, int> IntTuple4; | |
124 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |