Home | History | Annotate | Download | only in gtest

Lines Matching refs:tuple

79 //   // Prints the fields of a tuple tersely to a string vector, one
80 // // element for each field. Tuple support must be enabled in
83 // const Tuple& value);
112 # include <tuple>
646 // Helper function for printing a tuple. T must be instantiated with
647 // a tuple type.
653 // Overload for ::std::tr1::tuple. Needed for printing function arguments,
658 // regardless of whether tr1::tuple is implemented using the
661 inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) {
666 void PrintTo(const ::std::tr1::tuple<T1>& t, ::std::ostream* os) {
671 void PrintTo(const ::std::tr1::tuple<T1, T2>& t, ::std::ostream* os) {
676 void PrintTo(const ::std::tr1::tuple<T1, T2, T3>& t, ::std::ostream* os) {
681 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4>& t, ::std::ostream* os) {
686 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5>& t,
693 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6>& t,
700 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7>& t,
707 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8>& t,
714 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>& t,
722 const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& t,
730 void PrintTo(const ::std::tuple<Types...>& t, ::std::ostream* os) {
966 // size of tuple TupleT.
968 // static function extracting element I of tuple TupleT.
970 // type of element I of tuple TupleT.
977 typedef TupleT Tuple;
978 static const size_t tuple_size = ::std::tr1::tuple_size<Tuple>::value;
981 struct tuple_element : ::std::tr1::tuple_element<static_cast<int>(I), Tuple> {
986 static_cast<int>(I), Tuple>::type>::type
987 get(const Tuple& tuple) {
988 return ::std::tr1::get<I>(tuple);
997 struct TuplePolicy< ::std::tuple<Types...> > {
998 typedef ::std::tuple<Types...> Tuple;
999 static const size_t tuple_size = ::std::tuple_size<Tuple>::value;
1002 struct tuple_element : ::std::tuple_element<I, Tuple> {};
1005 static const typename ::std::tuple_element<I, Tuple>::type& get(
1006 const Tuple& tuple) {
1007 return ::std::get<I>(tuple);
1011 const size_t TuplePolicy< ::std::tuple<Types...> >::tuple_size;
1017 // induction on the number of tuple fields. The idea is that
1019 // fields in tuple t, and can be defined in terms of
1025 // Prints the first N fields of a tuple.
1026 template <typename Tuple>
1027 static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) {
1035 typename TuplePolicy<Tuple>::template tuple_element<N - 1>::type>
1036 ::Print(TuplePolicy<Tuple>::template get<N - 1>(t), os);
1039 // Tersely prints the first N fields of a tuple to a string vector,
1041 template <typename Tuple>
1042 static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) {
1045 UniversalTersePrint(TuplePolicy<Tuple>::template get<N - 1>(t), &ss);
1053 template <typename Tuple>
1054 static void PrintPrefixTo(const Tuple&, ::std::ostream*) {}
1056 template <typename Tuple>
1057 static void TersePrintPrefixToStrings(const Tuple&, Strings*) {}
1060 // Helper function for printing a tuple.
1061 // Tuple must be either std::tr1::tuple or std::tuple type.
1062 template <typename Tuple>
1063 void PrintTupleTo(const Tuple& t, ::std::ostream* os) {
1065 TuplePrefixPrinter<TuplePolicy<Tuple>::tuple_size>::PrintPrefixTo(t, os);
1069 // Prints the fields of a tuple tersely to a string vector, one
1072 template <typename Tuple>
1073 Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) {
1075 TuplePrefixPrinter<TuplePolicy<Tuple>::tuple_size>::