Home | History | Annotate | Download | only in internal

Lines Matching refs:tuple

34 // Implements a subset of TR1 tuple needed by Google Test and Google Mock.
42 // tuple template as a friend (it complains that tuple is redefined). This
50 template <GTEST_10_TYPENAMES_(U)> friend class tuple; \
54 // GTEST_n_TUPLE_(T) is the type of an n-tuple.
55 #define GTEST_0_TUPLE_(T) tuple<>
56 #define GTEST_1_TUPLE_(T) tuple<T##0, void, void, void, void, void, void, \
58 #define GTEST_2_TUPLE_(T) tuple<T##0, T##1, void, void, void, void, void, \
60 #define GTEST_3_TUPLE_(T) tuple<T##0, T##1, T##2, void, void, void, void, \
62 #define GTEST_4_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, void, void, void, \
64 #define GTEST_5_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, void, void, \
66 #define GTEST_6_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, void, \
68 #define GTEST_7_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
70 #define GTEST_8_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
72 #define GTEST_9_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
74 #define GTEST_10_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
109 class tuple;
138 // iff k < the number of fields in tuple type T.
139 template <bool kIndexValid, int kIndex, class Tuple>
175 class tuple<> {
177 tuple() {}
178 tuple(const tuple& /* t */) {}
179 tuple& operator=(const tuple& /* t */) { return *this; }
187 tuple() : f0_() {}
189 explicit tuple(GTEST_BY_REF_(T0) f0) : f0_(f0) {}
191 tuple(const tuple& t) : f0_(t.f0_) {}
194 tuple(const GTEST_1_TUPLE_(U)& t) : f0_(t.f0_) {}
196 tuple& operator=(const tuple& t) { return CopyFrom(t); }
199 tuple& operator=(const GTEST_1_TUPLE_(U)& t) {
206 tuple& CopyFrom(const GTEST_1_TUPLE_(U)& t) {
219 tuple() : f0_(), f1_() {}
221 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1) : f0_(f0),
224 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_) {}
227 tuple(const GTEST_2_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_) {}
229 tuple(const ::std::pair<U0, U1>& p) : f0_(p.first), f1_(p.second) {}
231 tuple& operator=(const tuple& t) { return CopyFrom(t); }
234 tuple& operator=(const GTEST_2_TUPLE_(U)& t) {
238 tuple& operator=(const ::std::pair<U0, U1>& p) {
247 tuple& CopyFrom(const GTEST_2_TUPLE_(U)& t) {
262 tuple() : f0_(), f1_(), f2_() {}
264 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
267 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}
270 tuple(const GTEST_3_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}
272 tuple& operator=(const tuple& t) { return CopyFrom(t); }
275 tuple& operator=(const GTEST_3_TUPLE_(U)& t) {
282 tuple& CopyFrom(const GTEST_3_TUPLE_(U)& t) {
299 tuple() : f0_(), f1_(), f2_(), f3_() {}
301 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
305 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_) {}
308 tuple(const GTEST_4_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
311 tuple& operator=(const tuple& t) { return CopyFrom(t); }
314 tuple& operator=(const GTEST_4_TUPLE_(U)& t) {
321 tuple& CopyFrom(const GTEST_4_TUPLE_(U)& t) {
340 tuple() : f0_(), f1_(), f2_(), f3_(), f4_() {}
342 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
346 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
350 tuple(const GTEST_5_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
353 tuple& operator=(const tuple& t) { return CopyFrom(t); }
356 tuple& operator=(const GTEST_5_TUPLE_(U)& t) {
363 tuple& CopyFrom(const GTEST_5_TUPLE_(U)& t) {
384 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_() {}
386 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
391 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
395 tuple(const GTEST_6_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
398 tuple& operator=(const tuple& t) { return CopyFrom(t); }
401 tuple& operator=(const GTEST_6_TUPLE_(U)& t) {
408 tuple& CopyFrom(const GTEST_6_TUPLE_(U)& t) {
431 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_() {}
433 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
438 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
442 tuple(const GTEST_7_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
445 tuple& operator=(const tuple& t) { return CopyFrom(t); }
448 tuple& operator=(const GTEST_7_TUPLE_(U)& t) {
455 tuple& CopyFrom(const GTEST_7_TUPLE_(U)& t) {
480 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_() {}
482 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
488 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
492 tuple(const GTEST_8_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
495 tuple& operator=(const tuple& t) { return CopyFrom(t); }
498 tuple& operator=(const GTEST_8_TUPLE_(U)& t) {
505 tuple& CopyFrom(const GTEST_8_TUPLE_(U)& t) {
532 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_() {}
534 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
540 tuple(const tuple
544 tuple(const GTEST_9_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
547 tuple& operator=(const tuple& t) { return CopyFrom(t); }
550 tuple& operator=(const GTEST_9_TUPLE_(U)& t) {
557 tuple& CopyFrom(const GTEST_9_TUPLE_(U)& t) {
582 class tuple {
586 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_(),
589 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
595 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
599 tuple(const GTEST_10_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
603 tuple& operator=(const tuple& t) { return CopyFrom(t); }
606 tuple& operator=(const GTEST_10_TUPLE_(U)& t) {
613 tuple& CopyFrom(const GTEST_10_TUPLE_(U)& t) {
639 // 6.1.3.2 Tuple creation functions.
645 inline tuple<> make_tuple() { return tuple<>(); }
706 // 6.1.3.3 Tuple helper classes.
708 template <typename Tuple> struct tuple_size;
743 template <int k, class Tuple>
746 k < (tuple_size<Tuple>::value), k, Tuple>::type type;
749 #define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element<k, Tuple >::type
758 template <class Tuple>
759 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple))
760 Field(Tuple& t) { return t.f0_; } // NOLINT
762 template <class Tuple>
763 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple))
764 ConstField(const Tuple& t) { return t.f0_; }
770 template <class Tuple>
771 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple))
772 Field(Tuple& t) { return t.f1_; } // NOLINT
774 template <class Tuple>
775 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple))
776 ConstField(const Tuple& t) { return t.f1_; }
782 template <class Tuple>
783 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple))
784 Field(Tuple& t) { return t.f2_; } // NOLINT
786 template <class Tuple>
787 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple))
788 ConstField(const Tuple& t) { return t.f2_; }
794 template <class Tuple>
795 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple))
796 Field(Tuple& t) { return t.f3_; } // NOLINT
798 template <class Tuple>
799 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple))
800 ConstField(const Tuple& t) { return t.f3_; }
806 template <class Tuple>
807 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple))
808 Field(Tuple& t) { return t.f4_; } // NOLINT
810 template <class Tuple>
811 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple))
812 ConstField(const Tuple& t) { return t.f4_; }
818 template <class Tuple>
819 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple))
820 Field(Tuple& t) { return t.f5_; } // NOLINT
822 template <class Tuple>
823 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple))
824 ConstField(const Tuple& t) { return t.f5_; }
830 template <class Tuple>
831 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple))
832 Field(Tuple& t) { return t.f6_; } // NOLINT
834 template <class Tuple>
835 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple))
836 ConstField(const Tuple& t) { return t.f6_; }
842 template <class Tuple>
843 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple))
844 Field(Tuple& t) { return t.f7_; } // NOLINT
846 template <class Tuple>
847 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple))
848 ConstField(const Tuple& t) { return t.f7_; }
854 template <class Tuple>
855 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple))
856 Field(Tuple& t) { return t.f8_; } // NOLINT
858 template <class Tuple>
859 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple))
860 ConstField(const Tuple& t) { return t.f8_; }
866 template <class Tuple>
867 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple))
868 Field(Tuple& t) { return t.f9_; } // NOLINT
870 template <class Tuple>
871 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple))
872 ConstField(const Tuple& t) { return t.f9_; }