Home | History | Annotate | Download | only in gtest

Lines Matching refs:tuple

76 //   // Prints the fields of a tuple tersely to a string vector, one
77 // // element for each field. Tuple support must be enabled in
80 // const Tuple& value);
107 # include <tuple>
585 // Helper function for printing a tuple. T must be instantiated with
586 // a tuple type.
592 // Overload for ::std::tr1::tuple. Needed for printing function arguments,
597 // regardless of whether tr1::tuple is implemented using the
600 inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) {
605 void PrintTo(const ::std::tr1::tuple<T1>& t, ::std::ostream* os) {
610 void PrintTo(const ::std::tr1::tuple<T1, T2>& t, ::std::ostream* os) {
615 void PrintTo(const ::std::tr1::tuple<T1, T2, T3>& t, ::std::ostream* os) {
620 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4>& t, ::std::ostream* os) {
625 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5>& t,
632 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6>& t,
639 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7>& t,
646 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8>& t,
653 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>& t,
661 const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& t,
669 void PrintTo(const ::std::tuple<Types...>& t, ::std::ostream* os) {
863 // size of tuple TupleT.
865 // static function extracting element I of tuple TupleT.
867 tuple TupleT.
874 typedef TupleT Tuple;
875 static const size_t tuple_size = ::std::tr1::tuple_size<Tuple>::value;
878 struct tuple_element : ::std::tr1::tuple_element<I, Tuple> {};
882 const typename ::std::tr1::tuple_element<I, Tuple>::type>::type get(
883 const Tuple& tuple) {
884 return ::std::tr1::get<I>(tuple);
893 struct TuplePolicy< ::std::tuple<Types...> > {
894 typedef ::std::tuple<Types...> Tuple;
895 static const size_t tuple_size = ::std::tuple_size<Tuple>::value;
898 struct tuple_element : ::std::tuple_element<I, Tuple> {};
901 static const typename ::std::tuple_element<I, Tuple>::type& get(
902 const Tuple& tuple) {
903 return ::std::get<I>(tuple);
907 const size_t TuplePolicy< ::std::tuple<Types...> >::tuple_size;
913 // induction on the number of tuple fields. The idea is that
915 // fields in tuple t, and can be defined in terms of
921 // Prints the first N fields of a tuple.
922 template <typename Tuple>
923 static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) {
931 typename TuplePolicy<Tuple>::template tuple_element<N - 1>::type>
932 ::Print(TuplePolicy<Tuple>::template get<N - 1>(t), os);
935 // Tersely prints the first N fields of a tuple to a string vector,
937 template <typename Tuple>
938 static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) {
941 UniversalTersePrint(TuplePolicy<Tuple>::template get<N - 1>(t), &ss);
949 template <typename Tuple>
950 static void PrintPrefixTo(const Tuple&, ::std::ostream*) {}
952 template <typename Tuple>
953 static void TersePrintPrefixToStrings(const Tuple&, Strings*) {}
956 // Helper function for printing a tuple.
957 // Tuple must be either std::tr1::tuple or std::tuple type.
958 template <typename Tuple>
959 void PrintTupleTo(const Tuple& t, ::std::ostream* os) {
961 TuplePrefixPrinter<TuplePolicy<Tuple>::tuple_size>::PrintPrefixTo(t, os);
965 // Prints the fields of a tuple tersely to a string vector, one
968 template <typename Tuple>
969 Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) {
971 TuplePrefixPrinter<TuplePolicy<Tuple>::tuple_size>::