Makes gmock's Pointee() work for optional<T> (by Jeffrey Yasskin).

This commit is contained in:
vladlosev
2012-08-14 15:38:49 +00:00
parent 2fd619edd3
commit ada23475e2
2 changed files with 33 additions and 1 deletions

View File

@@ -73,7 +73,7 @@ struct PointeeOf<T*> { typedef T type; }; // NOLINT
// smart pointer, or returns p itself when p is already a raw pointer.
// The following default implementation is for the smart pointer case.
template <typename Pointer>
inline typename Pointer::element_type* GetRawPointer(const Pointer& p) {
inline const typename Pointer::element_type* GetRawPointer(const Pointer& p) {
return p.get();
}
// This overloaded version is for the raw pointer case.