Make Extension a template
diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
index 30c43bc..300ba7c 100644
--- a/src/hb-ot-layout-gsubgpos-private.hh
+++ b/src/hb-ot-layout-gsubgpos-private.hh
@@ -1765,6 +1765,7 @@
   DEFINE_SIZE_STATIC (8);
 };
 
+template <typename T>
 struct Extension
 {
   inline unsigned int get_type (void) const
@@ -1782,6 +1783,12 @@
     }
   }
 
+  template <typename context_t>
+  inline typename context_t::return_t process (context_t *c) const
+  {
+    return CastP<T>(this)->get_subtable ().process (c, get_type ());
+  }
+
   inline bool sanitize (hb_sanitize_context_t *c) {
     TRACE_SANITIZE (this);
     if (!u.format.sanitize (c)) return TRACE_RETURN (false);