1template <typename StructPtrType> 2{{struct.name}}Ptr {{struct.name}}::Clone() const { 3 return New( 4{%- for field in struct.fields %} 5 mojo::Clone({{field.name}}) 6{%- if not loop.last -%},{%- endif %} 7{%- endfor %} 8 ); 9} 10 11template <typename T, 12 typename std::enable_if<std::is_same< 13 T, {{struct.name}}>::value>::type*> 14bool {{struct.name}}::Equals(const T& other_struct) const { 15{%- for field in struct.fields %} 16 if (!mojo::Equals(this->{{field.name}}, other_struct.{{field.name}})) 17 return false; 18{%- endfor %} 19 return true; 20} 21