diff options
author | Moonchild <moonchild@palemoon.org> | 2023-11-04 00:13:32 +0100 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-11-05 13:17:15 +0100 |
commit | 05abfd8200c56d52f74ca4ebdca4d1536d376fdd (patch) | |
tree | f901d577fc54b63e9ba7670a33910b3996e723b2 | |
parent | a8a9d2cbd4cb3f3cee3c55ebe81d08a6f948a0c5 (diff) | |
download | uxp-05abfd8200c56d52f74ca4ebdca4d1536d376fdd.tar.gz |
Issue #2281 - Remove the use of non-standard namespace std::tr1 in
Google's WebRTC gtest code
3 files changed, 64 insertions, 61 deletions
diff --git a/media/webrtc/trunk/testing/gtest/include/gtest/gtest-printers.h b/media/webrtc/trunk/testing/gtest/include/gtest/gtest-printers.h index 0639d9f586..686e85f106 100644 --- a/media/webrtc/trunk/testing/gtest/include/gtest/gtest-printers.h +++ b/media/webrtc/trunk/testing/gtest/include/gtest/gtest-printers.h @@ -1,4 +1,5 @@ // Copyright 2007, Google Inc. +// Copyright 2023, Moonchild Productions // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -494,60 +495,60 @@ void PrintTupleTo(const T& t, ::std::ostream* os); // regardless of whether tr1::tuple is implemented using the // non-standard variadic template feature or not. -inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) { +inline void PrintTo(const ::std::tuple<>& t, ::std::ostream* os) { PrintTupleTo(t, os); } template <typename T1> -void PrintTo(const ::std::tr1::tuple<T1>& t, ::std::ostream* os) { +void PrintTo(const ::std::tuple<T1>& t, ::std::ostream* os) { PrintTupleTo(t, os); } template <typename T1, typename T2> -void PrintTo(const ::std::tr1::tuple<T1, T2>& t, ::std::ostream* os) { +void PrintTo(const ::std::tuple<T1, T2>& t, ::std::ostream* os) { PrintTupleTo(t, os); } template <typename T1, typename T2, typename T3> -void PrintTo(const ::std::tr1::tuple<T1, T2, T3>& t, ::std::ostream* os) { +void PrintTo(const ::std::tuple<T1, T2, T3>& t, ::std::ostream* os) { PrintTupleTo(t, os); } template <typename T1, typename T2, typename T3, typename T4> -void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4>& t, ::std::ostream* os) { +void PrintTo(const ::std::tuple<T1, T2, T3, T4>& t, ::std::ostream* os) { PrintTupleTo(t, os); } template <typename T1, typename T2, typename T3, typename T4, typename T5> -void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5>& t, +void PrintTo(const ::std::tuple<T1, T2, T3, T4, T5>& t, ::std::ostream* os) { PrintTupleTo(t, os); } template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> -void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6>& t, +void PrintTo(const ::std::tuple<T1, T2, T3, T4, T5, T6>& t, ::std::ostream* os) { PrintTupleTo(t, os); } template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7> -void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7>& t, +void PrintTo(const ::std::tuple<T1, T2, T3, T4, T5, T6, T7>& t, ::std::ostream* os) { PrintTupleTo(t, os); } template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> -void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8>& t, +void PrintTo(const ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8>& t, ::std::ostream* os) { PrintTupleTo(t, os); } template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9> -void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>& t, +void PrintTo(const ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>& t, ::std::ostream* os) { PrintTupleTo(t, os); } @@ -555,7 +556,7 @@ void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>& t, template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10> void PrintTo( - const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& t, + const ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& t, ::std::ostream* os) { PrintTupleTo(t, os); } @@ -774,8 +775,8 @@ struct TuplePrefixPrinter { static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) { TuplePrefixPrinter<N - 1>::PrintPrefixTo(t, os); *os << ", "; - UniversalPrinter<typename ::std::tr1::tuple_element<N - 1, Tuple>::type> - ::Print(::std::tr1::get<N - 1>(t), os); + UniversalPrinter<typename ::std::tuple_element<N - 1, Tuple>::type> + ::Print(::std::get<N - 1>(t), os); } // Tersely prints the first N fields of a tuple to a string vector, @@ -784,7 +785,7 @@ struct TuplePrefixPrinter { static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) { TuplePrefixPrinter<N - 1>::TersePrintPrefixToStrings(t, strings); ::std::stringstream ss; - UniversalTersePrint(::std::tr1::get<N - 1>(t), &ss); + UniversalTersePrint(::std::get<N - 1>(t), &ss); strings->push_back(ss.str()); } }; @@ -807,14 +808,14 @@ template <> struct TuplePrefixPrinter<1> { template <typename Tuple> static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) { - UniversalPrinter<typename ::std::tr1::tuple_element<0, Tuple>::type>:: - Print(::std::tr1::get<0>(t), os); + UniversalPrinter<typename ::std::tuple_element<0, Tuple>::type>:: + Print(::std::get<0>(t), os); } template <typename Tuple> static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) { ::std::stringstream ss; - UniversalTersePrint(::std::tr1::get<0>(t), &ss); + UniversalTersePrint(::std::get<0>(t), &ss); strings->push_back(ss.str()); } }; @@ -824,7 +825,7 @@ struct TuplePrefixPrinter<1> { template <typename T> void PrintTupleTo(const T& t, ::std::ostream* os) { *os << "("; - TuplePrefixPrinter< ::std::tr1::tuple_size<T>::value>:: + TuplePrefixPrinter< ::std::tuple_size<T>::value>:: PrintPrefixTo(t, os); *os << ")"; } @@ -835,7 +836,7 @@ void PrintTupleTo(const T& t, ::std::ostream* os) { template <typename Tuple> Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) { Strings result; - TuplePrefixPrinter< ::std::tr1::tuple_size<Tuple>::value>:: + TuplePrefixPrinter< ::std::tuple_size<Tuple>::value>:: TersePrintPrefixToStrings(value, &result); return result; } diff --git a/media/webrtc/trunk/testing/gtest/include/gtest/internal/gtest-param-util-generated.h b/media/webrtc/trunk/testing/gtest/include/gtest/internal/gtest-param-util-generated.h index e80548592c..fa8f6f0c3b 100644 --- a/media/webrtc/trunk/testing/gtest/include/gtest/internal/gtest-param-util-generated.h +++ b/media/webrtc/trunk/testing/gtest/include/gtest/internal/gtest-param-util-generated.h @@ -2,7 +2,8 @@ // pump.py gtest-param-util-generated.h.pump // DO NOT EDIT BY HAND!!! -// Copyright 2008 Google Inc. +// Copyright 2008, Google Inc. +// Copyright 2023, Moonchild Productions // All Rights Reserved. // // Redistribution and use in source and binary forms, with or without @@ -3157,9 +3158,9 @@ class ValueArray50 { // template <typename T1, typename T2> class CartesianProductGenerator2 - : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2> > { + : public ParamGeneratorInterface< ::std::tuple<T1, T2> > { public: - typedef ::std::tr1::tuple<T1, T2> ParamType; + typedef ::std::tuple<T1, T2> ParamType; CartesianProductGenerator2(const ParamGenerator<T1>& g1, const ParamGenerator<T2>& g2) @@ -3272,9 +3273,9 @@ class CartesianProductGenerator2 template <typename T1, typename T2, typename T3> class CartesianProductGenerator3 - : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3> > { + : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3> > { public: - typedef ::std::tr1::tuple<T1, T2, T3> ParamType; + typedef ::std::tuple<T1, T2, T3> ParamType; CartesianProductGenerator3(const ParamGenerator<T1>& g1, const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3) @@ -3404,9 +3405,9 @@ class CartesianProductGenerator3 template <typename T1, typename T2, typename T3, typename T4> class CartesianProductGenerator4 - : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4> > { + : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4> > { public: - typedef ::std::tr1::tuple<T1, T2, T3, T4> ParamType; + typedef ::std::tuple<T1, T2, T3, T4> ParamType; CartesianProductGenerator4(const ParamGenerator<T1>& g1, const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, @@ -3555,9 +3556,9 @@ class CartesianProductGenerator4 template <typename T1, typename T2, typename T3, typename T4, typename T5> class CartesianProductGenerator5 - : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5> > { + : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5> > { public: - typedef ::std::tr1::tuple<T1, T2, T3, T4, T5> ParamType; + typedef ::std::tuple<T1, T2, T3, T4, T5> ParamType; CartesianProductGenerator5(const ParamGenerator<T1>& g1, const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, @@ -3723,10 +3724,10 @@ class CartesianProductGenerator5 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> class CartesianProductGenerator6 - : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, + : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6> > { public: - typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> ParamType; + typedef ::std::tuple<T1, T2, T3, T4, T5, T6> ParamType; CartesianProductGenerator6(const ParamGenerator<T1>& g1, const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, @@ -3909,10 +3910,10 @@ class CartesianProductGenerator6 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7> class CartesianProductGenerator7 - : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, + : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6, T7> > { public: - typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType; + typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType; CartesianProductGenerator7(const ParamGenerator<T1>& g1, const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, @@ -4112,10 +4113,10 @@ class CartesianProductGenerator7 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> class CartesianProductGenerator8 - : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, + : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8> > { public: - typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType; + typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType; CartesianProductGenerator8(const ParamGenerator<T1>& g1, const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, @@ -4334,10 +4335,10 @@ class CartesianProductGenerator8 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9> class CartesianProductGenerator9 - : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, + : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> > { public: - typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType; + typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType; CartesianProductGenerator9(const ParamGenerator<T1>& g1, const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, @@ -4573,10 +4574,10 @@ class CartesianProductGenerator9 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10> class CartesianProductGenerator10 - : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, + : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> > { public: - typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType; + typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType; CartesianProductGenerator10(const ParamGenerator<T1>& g1, const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, @@ -4838,8 +4839,8 @@ class CartesianProductHolder2 { CartesianProductHolder2(const Generator1& g1, const Generator2& g2) : g1_(g1), g2_(g2) {} template <typename T1, typename T2> - operator ParamGenerator< ::std::tr1::tuple<T1, T2> >() const { - return ParamGenerator< ::std::tr1::tuple<T1, T2> >( + operator ParamGenerator< ::std::tuple<T1, T2> >() const { + return ParamGenerator< ::std::tuple<T1, T2> >( new CartesianProductGenerator2<T1, T2>( static_cast<ParamGenerator<T1> >(g1_), static_cast<ParamGenerator<T2> >(g2_))); @@ -4860,8 +4861,8 @@ CartesianProductHolder3(const Generator1& g1, const Generator2& g2, const Generator3& g3) : g1_(g1), g2_(g2), g3_(g3) {} template <typename T1, typename T2, typename T3> - operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >() const { - return ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >( + operator ParamGenerator< ::std::tuple<T1, T2, T3> >() const { + return ParamGenerator< ::std::tuple<T1, T2, T3> >( new CartesianProductGenerator3<T1, T2, T3>( static_cast<ParamGenerator<T1> >(g1_), static_cast<ParamGenerator<T2> >(g2_), @@ -4885,8 +4886,8 @@ CartesianProductHolder4(const Generator1& g1, const Generator2& g2, const Generator3& g3, const Generator4& g4) : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {} template <typename T1, typename T2, typename T3, typename T4> - operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >() const { - return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >( + operator ParamGenerator< ::std::tuple<T1, T2, T3, T4> >() const { + return ParamGenerator< ::std::tuple<T1, T2, T3, T4> >( new CartesianProductGenerator4<T1, T2, T3, T4>( static_cast<ParamGenerator<T1> >(g1_), static_cast<ParamGenerator<T2> >(g2_), @@ -4912,8 +4913,8 @@ CartesianProductHolder5(const Generator1& g1, const Generator2& g2, const Generator3& g3, const Generator4& g4, const Generator5& g5) : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {} template <typename T1, typename T2, typename T3, typename T4, typename T5> - operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >() const { - return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >( + operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5> >() const { + return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5> >( new CartesianProductGenerator5<T1, T2, T3, T4, T5>( static_cast<ParamGenerator<T1> >(g1_), static_cast<ParamGenerator<T2> >(g2_), @@ -4943,8 +4944,8 @@ CartesianProductHolder6(const Generator1& g1, const Generator2& g2, : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {} template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> - operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >() const { - return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >( + operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6> >() const { + return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6> >( new CartesianProductGenerator6<T1, T2, T3, T4, T5, T6>( static_cast<ParamGenerator<T1> >(g1_), static_cast<ParamGenerator<T2> >(g2_), @@ -4976,9 +4977,9 @@ CartesianProductHolder7(const Generator1& g1, const Generator2& g2, : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {} template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7> - operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, + operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7> >() const { - return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> >( + return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7> >( new CartesianProductGenerator7<T1, T2, T3, T4, T5, T6, T7>( static_cast<ParamGenerator<T1> >(g1_), static_cast<ParamGenerator<T2> >(g2_), @@ -5014,9 +5015,9 @@ CartesianProductHolder8(const Generator1& g1, const Generator2& g2, g8_(g8) {} template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> - operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, + operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >() const { - return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >( + return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >( new CartesianProductGenerator8<T1, T2, T3, T4, T5, T6, T7, T8>( static_cast<ParamGenerator<T1> >(g1_), static_cast<ParamGenerator<T2> >(g2_), @@ -5055,9 +5056,9 @@ CartesianProductHolder9(const Generator1& g1, const Generator2& g2, g9_(g9) {} template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9> - operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, + operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> >() const { - return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, + return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> >( new CartesianProductGenerator9<T1, T2, T3, T4, T5, T6, T7, T8, T9>( static_cast<ParamGenerator<T1> >(g1_), @@ -5099,9 +5100,9 @@ CartesianProductHolder10(const Generator1& g1, const Generator2& g2, g9_(g9), g10_(g10) {} template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10> - operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, + operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >() const { - return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, + return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >( new CartesianProductGenerator10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>( diff --git a/media/webrtc/trunk/testing/gtest/include/gtest/internal/gtest-param-util-generated.h.pump b/media/webrtc/trunk/testing/gtest/include/gtest/internal/gtest-param-util-generated.h.pump index 009206fd31..864fbee16b 100644 --- a/media/webrtc/trunk/testing/gtest/include/gtest/internal/gtest-param-util-generated.h.pump +++ b/media/webrtc/trunk/testing/gtest/include/gtest/internal/gtest-param-util-generated.h.pump @@ -1,7 +1,8 @@ $$ -*- mode: c++; -*- $var n = 50 $$ Maximum length of Values arguments we want to support. $var maxtuple = 10 $$ Maximum number of Combine arguments we want to support. -// Copyright 2008 Google Inc. +// Copyright 2008, Google Inc. +// Copyright 2023, Moonchild Productions // All Rights Reserved. // // Redistribution and use in source and binary forms, with or without @@ -128,9 +129,9 @@ $range k 2..i template <$for j, [[typename T$j]]> class CartesianProductGenerator$i - : public ParamGeneratorInterface< ::std::tr1::tuple<$for j, [[T$j]]> > { + : public ParamGeneratorInterface< ::std::tuple<$for j, [[T$j]]> > { public: - typedef ::std::tr1::tuple<$for j, [[T$j]]> ParamType; + typedef ::std::tuple<$for j, [[T$j]]> ParamType; CartesianProductGenerator$i($for j, [[const ParamGenerator<T$j>& g$j]]) : $for j, [[g$(j)_(g$j)]] {} @@ -269,8 +270,8 @@ class CartesianProductHolder$i { CartesianProductHolder$i($for j, [[const Generator$j& g$j]]) : $for j, [[g$(j)_(g$j)]] {} template <$for j, [[typename T$j]]> - operator ParamGenerator< ::std::tr1::tuple<$for j, [[T$j]]> >() const { - return ParamGenerator< ::std::tr1::tuple<$for j, [[T$j]]> >( + operator ParamGenerator< ::std::tuple<$for j, [[T$j]]> >() const { + return ParamGenerator< ::std::tuple<$for j, [[T$j]]> >( new CartesianProductGenerator$i<$for j, [[T$j]]>( $for j,[[ |