| Index: mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
|
| diff --git a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
|
| index f6bea2c5dfb613db5149cc7a21480f13fd02c877..25b39b30d0e5622390e3010e77dd2168224d8a57 100644
|
| --- a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
|
| @@ -19,6 +19,11 @@ class {{struct.name}} {
|
| return mojo::TypeConverter<{{struct.name}}Ptr, U>::Convert(u);
|
| }
|
|
|
| + template <typename U>
|
| + U To() const {
|
| + return mojo::TypeConverter<U, {{struct.name}}>::Convert(*this);
|
| + }
|
| +
|
| {{struct.name}}();
|
| ~{{struct.name}}();
|
|
|
|
|