Index: mojo/public/cpp/bindings/struct_ptr.h |
diff --git a/mojo/public/cpp/bindings/struct_ptr.h b/mojo/public/cpp/bindings/struct_ptr.h |
index ab5d57034559c65dc7de1c6fbac630f88f6d1e46..92f2728a3a08470541c0985e5d12e713e7363dbb 100644 |
--- a/mojo/public/cpp/bindings/struct_ptr.h |
+++ b/mojo/public/cpp/bindings/struct_ptr.h |
@@ -26,9 +26,10 @@ class StructHelper { |
} // namespace internal |
// Smart pointer wrapping a mojom structure with move-only semantics. |
-template <typename Struct> |
+template <typename S> |
class StructPtr { |
public: |
+ using Struct = S; |
StructPtr() : ptr_(nullptr) {} |
StructPtr(decltype(nullptr)) : ptr_(nullptr) {} |
@@ -116,9 +117,10 @@ class StructPtr { |
}; |
// Designed to be used when Struct is small and copyable. |
-template <typename Struct> |
+template <typename S> |
class InlinedStructPtr { |
public: |
+ using Struct = S; |
InlinedStructPtr() : is_null_(true) {} |
InlinedStructPtr(decltype(nullptr)) : is_null_(true) {} |