00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00035 #ifndef OW_STRICT_WEAK_ORDERING_HPP_INCLUDE_GUARD_
00036 #define OW_STRICT_WEAK_ORDERING_HPP_INCLUDE_GUARD_
00037 #include "OW_config.h"
00038
00039 namespace OW_NAMESPACE
00040 {
00041
00042 template<class T1>
00043 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1)
00044 {
00045 return lhs1 < rhs1;
00046 }
00047 template<class T1, class T2>
00048 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00049 const T2& lhs2, const T2& rhs2)
00050 {
00051 if (lhs1 < rhs1) return true;
00052 else if (rhs1 < lhs1) return false;
00053 else return StrictWeakOrdering(lhs2, rhs2);
00054 }
00055 template<class T1, class T2, class T3>
00056 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00057 const T2& lhs2, const T2& rhs2,
00058 const T3& lhs3, const T3& rhs3)
00059 {
00060 if (lhs1 < rhs1) return true;
00061 else if (rhs1 < lhs1) return false;
00062 else return StrictWeakOrdering(lhs2, rhs2,
00063 lhs3, rhs3);
00064 }
00065 template<class T1, class T2, class T3, class T4>
00066 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00067 const T2& lhs2, const T2& rhs2,
00068 const T3& lhs3, const T3& rhs3,
00069 const T4& lhs4, const T4& rhs4)
00070 {
00071 if (lhs1 < rhs1) return true;
00072 else if (rhs1 < lhs1) return false;
00073 else return StrictWeakOrdering(lhs2, rhs2,
00074 lhs3, rhs3,
00075 lhs4, rhs4);
00076 }
00077 template<class T1, class T2, class T3, class T4, class T5>
00078 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00079 const T2& lhs2, const T2& rhs2,
00080 const T3& lhs3, const T3& rhs3,
00081 const T4& lhs4, const T4& rhs4,
00082 const T5& lhs5, const T5& rhs5)
00083 {
00084 if (lhs1 < rhs1) return true;
00085 else if (rhs1 < lhs1) return false;
00086 else return StrictWeakOrdering(lhs2, rhs2,
00087 lhs3, rhs3,
00088 lhs4, rhs4,
00089 lhs5, rhs5);
00090 }
00091 template<class T1, class T2, class T3, class T4, class T5, class T6>
00092 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00093 const T2& lhs2, const T2& rhs2,
00094 const T3& lhs3, const T3& rhs3,
00095 const T4& lhs4, const T4& rhs4,
00096 const T5& lhs5, const T5& rhs5,
00097 const T6& lhs6, const T6& rhs6)
00098 {
00099 if (lhs1 < rhs1) return true;
00100 else if (rhs1 < lhs1) return false;
00101 else return StrictWeakOrdering(lhs2, rhs2,
00102 lhs3, rhs3,
00103 lhs4, rhs4,
00104 lhs5, rhs5,
00105 lhs6, rhs6);
00106 }
00107 template<class T1, class T2, class T3, class T4, class T5, class T6, class
00108 T7>
00109 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00110 const T2& lhs2, const T2& rhs2,
00111 const T3& lhs3, const T3& rhs3,
00112 const T4& lhs4, const T4& rhs4,
00113 const T5& lhs5, const T5& rhs5,
00114 const T6& lhs6, const T6& rhs6,
00115 const T7& lhs7, const T7& rhs7)
00116 {
00117 if (lhs1 < rhs1) return true;
00118 else if (rhs1 < lhs1) return false;
00119 else return StrictWeakOrdering(lhs2, rhs2,
00120 lhs3, rhs3,
00121 lhs4, rhs4,
00122 lhs5, rhs5,
00123 lhs6, rhs6,
00124 lhs7, rhs7);
00125 }
00126 template<class T1, class T2, class T3, class T4, class T5, class T6, class
00127 T7, class T8>
00128 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00129 const T2& lhs2, const T2& rhs2,
00130 const T3& lhs3, const T3& rhs3,
00131 const T4& lhs4, const T4& rhs4,
00132 const T5& lhs5, const T5& rhs5,
00133 const T6& lhs6, const T6& rhs6,
00134 const T7& lhs7, const T7& rhs7,
00135 const T8& lhs8, const T8& rhs8)
00136 {
00137 if (lhs1 < rhs1) return true;
00138 else if (rhs1 < lhs1) return false;
00139 else return StrictWeakOrdering(lhs2, rhs2,
00140 lhs3, rhs3,
00141 lhs4, rhs4,
00142 lhs5, rhs5,
00143 lhs6, rhs6,
00144 lhs7, rhs7,
00145 lhs8, rhs8);
00146 }
00147 template<class T1, class T2, class T3, class T4, class T5, class T6, class
00148 T7, class T8, class T9>
00149 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00150 const T2& lhs2, const T2& rhs2,
00151 const T3& lhs3, const T3& rhs3,
00152 const T4& lhs4, const T4& rhs4,
00153 const T5& lhs5, const T5& rhs5,
00154 const T6& lhs6, const T6& rhs6,
00155 const T7& lhs7, const T7& rhs7,
00156 const T8& lhs8, const T8& rhs8,
00157 const T9& lhs9, const T9& rhs9)
00158 {
00159 if (lhs1 < rhs1) return true;
00160 else if (rhs1 < lhs1) return false;
00161 else return StrictWeakOrdering(lhs2, rhs2,
00162 lhs3, rhs3,
00163 lhs4, rhs4,
00164 lhs5, rhs5,
00165 lhs6, rhs6,
00166 lhs7, rhs7,
00167 lhs8, rhs8,
00168 lhs9, rhs9);
00169 }
00170 template<class T1, class T2, class T3, class T4, class T5, class T6, class
00171 T7, class T8, class T9, class T10>
00172 bool StrictWeakOrdering(const T1& lhs1, const T1& rhs1,
00173 const T2& lhs2, const T2& rhs2,
00174 const T3& lhs3, const T3& rhs3,
00175 const T4& lhs4, const T4& rhs4,
00176 const T5& lhs5, const T5& rhs5,
00177 const T6& lhs6, const T6& rhs6,
00178 const T7& lhs7, const T7& rhs7,
00179 const T8& lhs8, const T8& rhs8,
00180 const T9& lhs9, const T9& rhs9,
00181 const T10& lhs10, const T10& rhs10)
00182 {
00183 if (lhs1 < rhs1) return true;
00184 else if (rhs1 < lhs1) return false;
00185 else return StrictWeakOrdering(lhs2, rhs2,
00186 lhs3, rhs3,
00187 lhs4, rhs4,
00188 lhs5, rhs5,
00189 lhs6, rhs6,
00190 lhs7, rhs7,
00191 lhs8, rhs8,
00192 lhs9, rhs9,
00193 lhs10, rhs10);
00194 }
00195
00196 }
00197
00198 #endif