From 9405efaeff341710956495fdc6b6e7be682bc585 Mon Sep 17 00:00:00 2001 From: Steve Anton Date: Wed, 19 Dec 2018 15:05:41 -0800 Subject: [PATCH] Add element_type typedef to rtc::scoped_refptr This allows rtc::scoped_refptr to be used with templates that use element_type as the mechanism to interface with smart pointers. Bug: None Change-Id: Ie742f416a78efce0b07cfa3009d939e51506ccf9 Reviewed-on: https://webrtc-review.googlesource.com/c/115100 Commit-Queue: Steve Anton Reviewed-by: Niels Moller Reviewed-by: Karl Wiberg Cr-Commit-Position: refs/heads/master@{#26078} --- api/scoped_refptr.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/scoped_refptr.h b/api/scoped_refptr.h index 0993e032cc..67d179fe7d 100644 --- a/api/scoped_refptr.h +++ b/api/scoped_refptr.h @@ -71,6 +71,8 @@ namespace rtc { template class scoped_refptr { public: + typedef T element_type; + scoped_refptr() : ptr_(nullptr) {} scoped_refptr(T* p) : ptr_(p) { // NOLINT(runtime/explicit)