Googletest export

Remove linked_ptr and use std::shared_ptr instead

PiperOrigin-RevId: 218618184
This commit is contained in:
Abseil Team
2018-10-24 22:04:43 -04:00
committed by Gennadiy Civil
parent a50e4f05b3
commit b57c703963
24 changed files with 624 additions and 84 deletions

View File

@@ -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.