diff options
| author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
|---|---|---|
| committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
| commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
| tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-cpp/gmock/files/gmock-1.4.0-more-gcc-4.7.patch | |
| download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip | |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-cpp/gmock/files/gmock-1.4.0-more-gcc-4.7.patch')
| -rw-r--r-- | dev-cpp/gmock/files/gmock-1.4.0-more-gcc-4.7.patch | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/dev-cpp/gmock/files/gmock-1.4.0-more-gcc-4.7.patch b/dev-cpp/gmock/files/gmock-1.4.0-more-gcc-4.7.patch new file mode 100644 index 000000000000..d28a121a474d --- /dev/null +++ b/dev-cpp/gmock/files/gmock-1.4.0-more-gcc-4.7.patch @@ -0,0 +1,144 @@ +taken from upstream repo + +------------------------------------------------------------------------ +r245 | zhanyong.wan | 2009-12-02 03:36:42 -0500 (Wed, 02 Dec 2009) | 2 lines + +Fixes a C++-standard-compliance bug in gmock-printers.h. + + +Index: include/gmock/gmock-printers.h +=================================================================== +--- include/gmock/gmock-printers.h (revision 244) ++++ include/gmock/gmock-printers.h (revision 245) +@@ -434,63 +434,10 @@ inline void PrintTo(const ::std::wstring + // Overload for ::std::tr1::tuple. Needed for printing function + // arguments, which are packed as tuples. + +-typedef ::std::vector<string> Strings; +- +-// This helper template allows PrintTo() for tuples and +-// UniversalTersePrintTupleFieldsToStrings() to be defined by +-// induction on the number of tuple fields. The idea is that +-// TuplePrefixPrinter<N>::PrintPrefixTo(t, os) prints the first N +-// fields in tuple t, and can be defined in terms of +-// TuplePrefixPrinter<N - 1>. +- +-// The inductive case. +-template <size_t N> +-struct TuplePrefixPrinter { +- // Prints the first N fields of a tuple. +- template <typename Tuple> +- 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); +- } +- +- // Tersely prints the first N fields of a tuple to a string vector, +- // one element for each field. +- template <typename Tuple> +- 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); +- strings->push_back(ss.str()); +- } +-}; +- +-// Base cases. +-template <> +-struct TuplePrefixPrinter<0> { +- template <typename Tuple> +- static void PrintPrefixTo(const Tuple&, ::std::ostream*) {} +- +- template <typename Tuple> +- static void TersePrintPrefixToStrings(const Tuple&, Strings*) {} +-}; +-template <> +-template <typename Tuple> +-void TuplePrefixPrinter<1>::PrintPrefixTo(const Tuple& t, ::std::ostream* os) { +- UniversalPrinter<typename ::std::tr1::tuple_element<0, Tuple>::type>:: +- Print(::std::tr1::get<0>(t), os); +-} +- + // Helper function for printing a tuple. T must be instantiated with + // a tuple type. + template <typename T> +-void PrintTupleTo(const T& t, ::std::ostream* os) { +- *os << "("; +- TuplePrefixPrinter< ::std::tr1::tuple_size<T>::value>:: +- PrintPrefixTo(t, os); +- *os << ")"; +-} ++void PrintTupleTo(const T& t, ::std::ostream* os); + + // Overloaded PrintTo() for tuples of various arities. We support + // tuples of up-to 10 fields. The following implementation works +@@ -725,6 +672,64 @@ void UniversalPrint(const T& value, ::st + UniversalPrinter<T>::Print(value, os); + } + ++typedef ::std::vector<string> Strings; ++ ++// This helper template allows PrintTo() for tuples and ++// UniversalTersePrintTupleFieldsToStrings() to be defined by ++// induction on the number of tuple fields. The idea is that ++// TuplePrefixPrinter<N>::PrintPrefixTo(t, os) prints the first N ++// fields in tuple t, and can be defined in terms of ++// TuplePrefixPrinter<N - 1>. ++ ++// The inductive case. ++template <size_t N> ++struct TuplePrefixPrinter { ++ // Prints the first N fields of a tuple. ++ template <typename Tuple> ++ 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); ++ } ++ ++ // Tersely prints the first N fields of a tuple to a string vector, ++ // one element for each field. ++ template <typename Tuple> ++ 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); ++ strings->push_back(ss.str()); ++ } ++}; ++ ++// Base cases. ++template <> ++struct TuplePrefixPrinter<0> { ++ template <typename Tuple> ++ static void PrintPrefixTo(const Tuple&, ::std::ostream*) {} ++ ++ template <typename Tuple> ++ static void TersePrintPrefixToStrings(const Tuple&, Strings*) {} ++}; ++template <> ++template <typename Tuple> ++void TuplePrefixPrinter<1>::PrintPrefixTo(const Tuple& t, ::std::ostream* os) { ++ UniversalPrinter<typename ::std::tr1::tuple_element<0, Tuple>::type>:: ++ Print(::std::tr1::get<0>(t), os); ++} ++ ++// Helper function for printing a tuple. T must be instantiated with ++// a tuple type. ++template <typename T> ++void PrintTupleTo(const T& t, ::std::ostream* os) { ++ *os << "("; ++ TuplePrefixPrinter< ::std::tr1::tuple_size<T>::value>:: ++ PrintPrefixTo(t, os); ++ *os << ")"; ++} ++ + // Prints the fields of a tuple tersely to a string vector, one + // element for each field. See the comment before + // UniversalTersePrint() for how we define "tersely". + +------------------------------------------------------------------------ |
