32 #ifndef TIANCHI_TCTUPLE_HPP
33 #define TIANCHI_TCTUPLE_HPP
36 namespace _tc_tuple_ns_
55 template<
typename T0,
typename T1>
57 _tc_tuple_ns_::null_type,
71 TcTuple(
const T0 &v0,
const T1 &v1)
87 inline bool operator ==(
const this_type &ref)
const
89 return ((m_v0 == ref.m_v0) &&
93 inline bool operator !=(
const this_type &ref)
const
95 return !((*this) == ref);
100 set(ref.m_v0, ref.m_v1);
103 inline void set(
const T0 &v0,
const T1 &v1)
109 inline void set0(
const T0 &v0)
119 inline void set1(
const T1 &v1)
135 template<
typename T0,
typename T1,
typename T2>
137 _tc_tuple_ns_::null_type,
150 TcTuple(
const T0 &v0,
const T1 &v1,
const T2 &v2)
166 inline bool operator ==(
const this_type &ref)
const
168 return ((m_v0 == ref.m_v0) &&
169 (m_v1 == ref.m_v1) &&
173 inline bool operator !=(
const this_type &ref)
const
175 return !((*this) == ref);
180 set(ref.m_v0, ref.m_v1, ref.m_v2);
183 inline void set(
const T0 &v0,
const T1 &v1,
const T2 &v2)
190 inline void set0(
const T0 &v0)
195 inline const T0 & get0()
const
200 inline void set1(
const T1 &v1)
205 inline const T1 & get1()
const
210 inline void set2(
const T2 &v2)
215 inline const T2 & get2()
const
227 template<
typename T0,
typename T1,
typename T2,
typename T3>
229 _tc_tuple_ns_::null_type,
241 TcTuple(
const T0 &v0,
const T1 &v1,
const T2 &v2,
const T3 &v3)
257 inline bool operator ==(
const this_type &ref)
const
259 return ((m_v0 == ref.m_v0) &&
260 (m_v1 == ref.m_v1) &&
261 (m_v2 == ref.m_v2) &&
265 inline bool operator !=(
const this_type &ref)
const
267 return !((*this) == ref);
272 set(ref.m_v0, ref.m_v1, ref.m_v2, ref.m_v3);
275 inline void set(
const T0 &v0,
const T1 &v1,
const T2 &v2,
const T3 &v3)
283 inline void set0(
const T0 &v0)
288 inline const T0 & get0()
const
293 inline void set1(
const T1 &v1)
298 inline const T1 & get1()
const
303 inline void set2(
const T2 &v2)
308 inline const T2 & get2()
const
313 inline void set3(
const T3 &v3)
318 inline const T3 & get3()
const
331 template<
typename T0,
typename T1,
typename T2,
typename T3,
334 _tc_tuple_ns_::null_type,
345 TcTuple(
const T0 &v0,
const T1 &v1,
const T2 &v2,
const T3 &v3,
const T4 &v4)
347 set(v0, v1, v2, v3, v4);
361 inline bool operator ==(
const this_type &ref)
const
363 return ((m_v0 == ref.m_v0) &&
364 (m_v1 == ref.m_v1) &&
365 (m_v2 == ref.m_v2) &&
366 (m_v3 == ref.m_v3) &&
370 inline bool operator !=(
const this_type &ref)
const
372 return !((*this) == ref);
377 set(ref.m_v0, ref.m_v1, ref.m_v2, ref.m_v3, ref.m_v4);
380 inline void set(
const T0 &v0,
const T1 &v1,
const T2 &v2,
const T3 &v3,
390 inline void set0(
const T0 &v0)
395 inline const T0 & get0()
const
400 inline void set1(
const T1 &v1)
405 inline const T1 & get1()
const
410 inline void set2(
const T2 &v2)
415 inline const T2 & get2()
const
420 inline void set3(
const T3 &v3)
425 inline const T3 & get3()
const
430 inline void set4(
const T4 &v4)
435 inline const T4 & get4()
const
449 template<
typename T0,
typename T1,
typename T2,
typename T3,
450 typename T4,
typename T5>
452 _tc_tuple_ns_::null_type,
462 TcTuple(
const T0 &v0,
const T1 &v1,
const T2 &v2,
const T3 &v3,
const T4 &v4,
465 set(v0, v1, v2, v3, v4, v5);
479 inline bool operator ==(
const this_type &ref)
const
481 return ((m_v0 == ref.m_v0) &&
482 (m_v1 == ref.m_v1) &&
483 (m_v2 == ref.m_v2) &&
484 (m_v3 == ref.m_v3) &&
485 (m_v4 == ref.m_v4) &&
489 inline bool operator !=(
const this_type &ref)
const
491 return !((*this) == ref);
496 set(ref.m_v0, ref.m_v1, ref.m_v2, ref.m_v3, ref.m_v4, ref.m_v5);
499 inline void set(
const T0 &v0,
const T1 &v1,
const T2 &v2,
const T3 &v3,
500 const T4 &v4,
const T5 &v5)
510 inline void set0(
const T0 &v0)
515 inline const T0 & get0()
const
520 inline void set1(
const T1 &v1)
525 inline const T1 & get1()
const
530 inline void set2(
const T2 &v2)
535 inline const T2 & get2()
const
540 inline void set3(
const T3 &v3)
545 inline const T3 & get3()
const
550 inline void set4(
const T4 &v4)
555 inline const T4 & get4()
const
560 inline void set5(
const T5 &v5)
565 inline const T5 & get5()
const
580 template<
typename T0,
typename T1,
typename T2,
typename T3,
581 typename T4,
typename T5,
typename T6>
583 _tc_tuple_ns_::null_type,
592 TcTuple(
const T0 &v0,
const T1 &v1,
const T2 &v2,
const T3 &v3,
const T4 &v4,
593 const T5 &v5,
const T6 &v6)
595 set(v0, v1, v2, v3, v4, v5, v6);
609 inline bool operator ==(
const this_type &ref)
const
611 return ((m_v0 == ref.m_v0) &&
612 (m_v1 == ref.m_v1) &&
613 (m_v2 == ref.m_v2) &&
614 (m_v3 == ref.m_v3) &&
615 (m_v4 == ref.m_v4) &&
616 (m_v5 == ref.m_v5) &&
620 inline bool operator !=(
const this_type &ref)
const
622 return !((*this) == ref);
627 set(ref.m_v0, ref.m_v1, ref.m_v2, ref.m_v3, ref.m_v4,
631 inline void set(
const T0 &v0,
const T1 &v1,
const T2 &v2,
const T3 &v3,
632 const T4 &v4,
const T5 &v5,
const T6 &v6)
643 inline void set0(
const T0 &v0)
648 inline const T0 & get0()
const
653 inline void set1(
const T1 &v1)
658 inline const T1 & get1()
const
663 inline void set2(
const T2 &v2)
668 inline const T2 & get2()
const
673 inline void set3(
const T3 &v3)
678 inline const T3 & get3()
const
683 inline void set4(
const T4 &v4)
688 inline const T4 & get4()
const
693 inline void set5(
const T5 &v5)
698 inline const T5 & get5()
const
703 inline void set6(
const T6 &v6)
708 inline const T6 & get6()
const
724 template<
typename T0,
typename T1,
typename T2,
typename T3,
725 typename T4,
typename T5,
typename T6,
typename T7>
727 _tc_tuple_ns_::null_type,
735 TcTuple(
const T0 &v0,
const T1 &v1,
const T2 &v2,
const T3 &v3,
const T4 &v4,
736 const T5 &v5,
const T6 &v6,
const T7 &v7)
738 set(v0, v1, v2, v3, v4, v5, v6, v7);
752 inline bool operator ==(
const this_type &ref)
const
754 return ((m_v0 == ref.m_v0) &&
755 (m_v1 == ref.m_v1) &&
756 (m_v2 == ref.m_v2) &&
757 (m_v3 == ref.m_v3) &&
758 (m_v4 == ref.m_v4) &&
759 (m_v5 == ref.m_v5) &&
760 (m_v6 == ref.m_v6) &&
764 inline bool operator !=(
const this_type &ref)
const
766 return !((*this) == ref);
771 set(ref.m_v0, ref.m_v1, ref.m_v2, ref.m_v3, ref.m_v4,
772 ref.m_v5, ref.m_v6, ref.m_v7);
775 inline void set(
const T0 &v0,
const T1 &v1,
const T2 &v2,
const T3 &v3,
776 const T4 &v4,
const T5 &v5,
const T6 &v6,
const T7 &v7)
788 inline void set0(
const T0 &v0)
793 inline const T0 & get0()
const
798 inline void set1(
const T1 &v1)
803 inline const T1 & get1()
const
808 inline void set2(
const T2 &v2)
813 inline const T2 & get2()
const
818 inline void set3(
const T3 &v3)
823 inline const T3 & get3()
const
828 inline void set4(
const T4 &v4)
833 inline const T4 & get4()
const
838 inline void set5(
const T5 &v5)
843 inline const T5 & get5()
const
848 inline void set6(
const T6 &v6)
853 inline const T6 & get6()
const
858 inline void set7(
const T7 &v7)
863 inline const T7 & get7()
const
880 template<
typename T0,
typename T1,
typename T2,
typename T3,
881 typename T4,
typename T5,
typename T6,
typename T7,
883 class TcTuple<T0, T1, T2, T3, T4, T5, T6, T7, T8,
884 _tc_tuple_ns_::null_type>
891 TcTuple(
const T0 &v0,
const T1 &v1,
const T2 &v2,
const T3 &v3,
const T4 &v4,
892 const T5 &v5,
const T6 &v6,
const T7 &v7,
const T8 &v8)
894 set(v0, v1, v2, v3, v4, v5, v6, v7, v8);
908 inline bool operator ==(
const this_type &ref)
const
910 return ((m_v0 == ref.m_v0) &&
911 (m_v1 == ref.m_v1) &&
912 (m_v2 == ref.m_v2) &&
913 (m_v3 == ref.m_v3) &&
914 (m_v4 == ref.m_v4) &&
915 (m_v5 == ref.m_v5) &&
916 (m_v6 == ref.m_v6) &&
917 (m_v7 == ref.m_v7) &&
921 inline bool operator !=(
const this_type &ref)
const
923 return !((*this) == ref);
928 set(ref.m_v0, ref.m_v1, ref.m_v2, ref.m_v3, ref.m_v4,
929 ref.m_v5, ref.m_v6, ref.m_v7, ref.m_v8);
932 inline void set(
const T0 &v0,
const T1 &v1,
const T2 &v2,
const T3 &v3,
933 const T4 &v4,
const T5 &v5,
const T6 &v6,
const T7 &v7,
947 inline void set0(
const T0 &v0)
952 inline const T0 & get0()
const
957 inline void set1(
const T1 &v1)
962 inline const T1 & get1()
const
967 inline void set2(
const T2 &v2)
972 inline const T2 & get2()
const
977 inline void set3(
const T3 &v3)
982 inline const T3 & get3()
const
987 inline void set4(
const T4 &v4)
992 inline const T4 & get4()
const
997 inline void set5(
const T5 &v5)
1002 inline const T5 & get5()
const
1007 inline void set6(
const T6 &v6)
1012 inline const T6 & get6()
const
1017 inline void set7(
const T7 &v7)
1022 inline const T7 & get7()
const
1027 inline void set8(
const T8 &v8)
1032 inline const T8 & get8()
const
1049 template<
typename T0,
typename T1,
typename T2,
typename T3,
1050 typename T4,
typename T5,
typename T6,
typename T7,
1051 typename T8,
typename T9>
1059 TcTuple(
const T0 &v0,
const T1 &v1,
const T2 &v2,
const T3 &v3,
const T4 &v4,
1060 const T5 &v5,
const T6 &v6,
const T7 &v7,
const T8 &v8,
const T9 &v9)
1062 set(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
1070 inline const this_type & operator =(
const this_type &ref)
1076 inline bool operator ==(
const this_type &ref)
const
1078 return ((m_v0 == ref.m_v0) &&
1079 (m_v1 == ref.m_v1) &&
1080 (m_v2 == ref.m_v2) &&
1081 (m_v3 == ref.m_v3) &&
1082 (m_v4 == ref.m_v4) &&
1083 (m_v5 == ref.m_v5) &&
1084 (m_v6 == ref.m_v6) &&
1085 (m_v7 == ref.m_v7) &&
1086 (m_v8 == ref.m_v8) &&
1087 (m_v9 == ref.m_v9));
1090 inline bool operator !=(
const this_type &ref)
const
1092 return !((*this) == ref);
1095 inline void set(
const this_type &ref)
1097 set(ref.m_v0, ref.m_v1, ref.m_v2, ref.m_v3, ref.m_v4,
1098 ref.m_v5, ref.m_v6, ref.m_v7, ref.m_v8, ref.m_v9);
1101 inline void set(
const T0 &v0,
const T1 &v1,
const T2 &v2,
const T3 &v3,
1102 const T4 &v4,
const T5 &v5,
const T6 &v6,
const T7 &v7,
1103 const T8 &v8,
const T9 &v9)
1117 inline void set0(
const T0 &v0)
1122 inline const T0 & get0()
const
1127 inline void set1(
const T1 &v1)
1132 inline const T1 & get1()
const
1137 inline void set2(
const T2 &v2)
1142 inline const T2 & get2()
const
1147 inline void set3(
const T3 &v3)
1152 inline const T3 & get3()
const
1157 inline void set4(
const T4 &v4)
1162 inline const T4 & get4()
const
1167 inline void set5(
const T5 &v5)
1172 inline const T5 & get5()
const
1177 inline void set6(
const T6 &v6)
1182 inline const T6 & get6()
const
1187 inline void set7(
const T7 &v7)
1192 inline const T7 & get7()
const
1197 inline void set8(
const T8 &v8)
1202 inline const T8 & get8()
const
1207 inline void set9(
const T9 &v9)
1212 inline const T9 & get9()
const
1231 #endif // TIANCHI_TCTUPLE_HPP