diff options
Diffstat (limited to 'googlemock/include/gmock/internal')
-rw-r--r-- | googlemock/include/gmock/internal/gmock-internal-utils.h | 9 | ||||
-rw-r--r-- | googlemock/include/gmock/internal/gmock-port.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h index 7514635..fd33c00 100644 --- a/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -92,6 +92,15 @@ inline const typename Pointer::element_type* GetRawPointer(const Pointer& p) { template <typename Element> inline Element* GetRawPointer(Element* p) { return p; } +// This comparator allows linked_ptr to be stored in sets. +template <typename T> +struct LinkedPtrLessThan { + bool operator()(const ::testing::internal::linked_ptr<T>& lhs, + const ::testing::internal::linked_ptr<T>& rhs) const { + return lhs.get() < rhs.get(); + } +}; + // Symbian compilation can be done with wchar_t being either a native // type or a typedef. Using Google Mock with OpenC without wchar_t // should require the definition of _STLP_NO_WCHAR_T. diff --git a/googlemock/include/gmock/internal/gmock-port.h b/googlemock/include/gmock/internal/gmock-port.h index c593249..fda27db 100644 --- a/googlemock/include/gmock/internal/gmock-port.h +++ b/googlemock/include/gmock/internal/gmock-port.h @@ -52,6 +52,7 @@ // here, as Google Mock depends on Google Test. Only add a utility // here if it's truly specific to Google Mock. +#include "gtest/internal/gtest-linked_ptr.h" #include "gtest/internal/gtest-port.h" #include "gmock/internal/custom/gmock-port.h" |