Home | History | Annotate | Download | only in internal

Lines Matching refs:Tuple

2 //     pump.py gtest-tuple.h.pump
36 // Implements a subset of TR1 tuple needed by Google Test and Google Mock.
44 // tuple template as a friend (it complains that tuple is redefined). This
52 template <GTEST_10_TYPENAMES_(U)> friend class tuple; \
56 // GTEST_n_TUPLE_(T) is the type of an n-tuple.
57 #define GTEST_0_TUPLE_(T) tuple<>
58 #define GTEST_1_TUPLE_(T) tuple<T##0, void, void, void, void, void, void, \
60 #define GTEST_2_TUPLE_(T) tuple<T##0, T##1, void, void, void, void, void, \
62 #define GTEST_3_TUPLE_(T) tuple<T##0, T##1, T##2, void, void, void, void, \
64 #define GTEST_4_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, void, void, void, \
66 #define GTEST_5_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, void, void, \
68 #define GTEST_6_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, void, \
70 #define GTEST_7_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
72 #define GTEST_8_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
74 #define GTEST_9_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
76 #define GTEST_10_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
111 class tuple;
140 // iff k < the number of fields in tuple type T.
141 template <bool kIndexValid, int kIndex, class Tuple>
197 class tuple<> {
199 tuple() {}
200 tuple(const tuple& /* t */) {}
201 tuple& operator=(const tuple& /* t */) { return *this; }
209 tuple() : f0_() {}
211 explicit tuple(GTEST_BY_REF_(T0) f0) : f0_(f0) {}
213 tuple(const tuple& t) : f0_(t.f0_) {}
216 tuple(const GTEST_1_TUPLE_(U)& t) : f0_(t.f0_) {}
218 tuple& operator=(const tuple& t) { return CopyFrom(t); }
221 tuple& operator=(const GTEST_1_TUPLE_(U)& t) {
228 tuple& CopyFrom(const GTEST_1_TUPLE_(U)& t) {
241 tuple() : f0_(), f1_() {}
243 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1) : f0_(f0),
246 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_) {}
249 tuple(const GTEST_2_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_) {}
251 tuple(const ::std::pair<U0, U1>& p) : f0_(p.first), f1_(p.second) {}
253 tuple& operator=(const tuple& t) { return CopyFrom(t); }
256 tuple& operator=(const GTEST_2_TUPLE_(U)& t) {
260 tuple& operator=(const ::std::pair<U0, U1>& p) {
269 tuple& CopyFrom(const GTEST_2_TUPLE_(U)& t) {
284 tuple() : f0_(), f1_(), f2_() {}
286 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
289 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}
292 tuple(const GTEST_3_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}
294 tuple& operator=(const tuple& t) { return CopyFrom(t); }
297 tuple& operator=(const GTEST_3_TUPLE_(U)& t) {
304 tuple& CopyFrom(const GTEST_3_TUPLE_(U)& t) {
321 tuple() : f0_(), f1_(), f2_(), f3_() {}
323 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
327 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_) {}
330 tuple(const GTEST_4_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
333 tuple& operator=(const tuple& t) { return CopyFrom(t); }
336 tuple& operator=(const GTEST_4_TUPLE_(U)& t) {
343 tuple& CopyFrom(const GTEST_4_TUPLE_(U)& t) {
362 tuple() : f0_(), f1_(), f2_(), f3_(), f4_() {}
364 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
368 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
372 tuple(const GTEST_5_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
375 tuple& operator=(const tuple& t) { return CopyFrom(t); }
378 tuple& operator=(const GTEST_5_TUPLE_(U)& t) {
385 tuple& CopyFrom(const GTEST_5_TUPLE_(U)& t) {
406 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_() {}
408 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
413 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
417 tuple(const GTEST_6_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
420 tuple& operator=(const tuple& t) { return CopyFrom(t); }
423 tuple& operator=(const GTEST_6_TUPLE_(U)& t) {
430 tuple& CopyFrom(const GTEST_6_TUPLE_(U)& t) {
453 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_() {}
455 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
460 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
464 tuple(const GTEST_7_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
467 tuple& operator=(const tuple& t) { return CopyFrom(t); }
470 tuple& operator=(const GTEST_7_TUPLE_(U)& t) {
477 tuple& CopyFrom(const GTEST_7_TUPLE_(U)& t) {
502 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_() {}
504 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
510 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
514 tuple(const GTEST_8_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
517 tuple& operator=(const tuple& t) { return CopyFrom(t); }
520 tuple& operator=(const GTEST_8_TUPLE_(U)& t) {
527 tuple& CopyFrom(const GTEST_8_TUPLE_(U)& t) {
554 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_() {}
556 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
562 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
566 tuple(const GTEST_9_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
569 tuple& operator=(const tuple& t) { return CopyFrom(t); }
572 tuple& operator=(const GTEST_9_TUPLE_(U)& t) {
579 tuple& CopyFrom(const GTEST_9_TUPLE_(U)& t) {
604 class tuple {
608 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_(),
611 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
617 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
621 tuple(const GTEST_10_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
625 tuple& operator=(const tuple& t) { return CopyFrom(t); }
628 tuple& operator=(const GTEST_10_TUPLE_(U)& t) {
635 tuple& CopyFrom(const GTEST_10_TUPLE_(U)& t) {
661 // 6.1.3.2 Tuple creation functions.
667 inline tuple<> make_tuple() { return tuple<>(); }
728 // 6.1.3.3 Tuple helper classes.
730 template <typename Tuple> struct tuple_size;
787 template <int k, class Tuple>
790 k < (tuple_size<Tuple>::value), k, Tuple>::type type;
793 #define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element<k, Tuple >::type
802 template <class Tuple>
803 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple))
804 Field(Tuple& t) { return t.f0_; } // NOLINT
806 template <class Tuple>
807 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple))
808 ConstField(const Tuple& t) { return t.f0_; }
814 template <class Tuple>
815 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple))
816 Field(Tuple& t) { return t.f1_; } // NOLINT
818 template <class Tuple>
819 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple))
820 ConstField(const Tuple& t) { return t.f1_; }
826 template <class Tuple>
827 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple))
828 Field(Tuple& t) { return t.f2_; } // NOLINT
830 template <class Tuple>
831 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple))
832 ConstField(const Tuple& t) { return t.f2_; }
838 template <class Tuple>
839 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple))
840 Field(Tuple& t) { return t.f3_; } // NOLINT
842 template <class Tuple>
843 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple))
844 ConstField(const Tuple& t) { return t.f3_; }
850 template <class Tuple>
851 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple))
852 Field(Tuple& t) { return t.f4_; } // NOLINT
854 template <class Tuple>
855 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple))
856 ConstField(const Tuple& t) { return t.f4_; }
862 template <class Tuple>
863 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple))
864 Field(Tuple& t) { return t.f5_; } // NOLINT
866 template <class Tuple>
867 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple))
868 ConstField(const Tuple& t) { return t.f5_; }
874 template <class Tuple>
875 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple))
876 Field(Tuple& t) { return t.f6_; } // NOLINT
878 template <class Tuple>
879 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple))
880 ConstField(const Tuple& t) { return t.f6_; }
886 template <class Tuple>
887 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple))
888 Field(Tuple& t) { return t.f7_; } // NOLINT
890 template <class Tuple>
891 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple))
892 ConstField(const Tuple& t) { return t.f7_; }
898 template <class Tuple>
899 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple))
900 Field(Tuple& t) { return t.f8_; } // NOLINT
902 template <class Tuple>
903 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple))
904 ConstField(const Tuple& t) { return t.f8_; }
910 template <class Tuple>
911 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple))
912 Field(Tuple& t) { return t.f9_; } // NOLINT
914 template <class Tuple>
915 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple))
916 ConstField(const Tuple& t) { return t.f9_; }