Generate a templated Clone method for all mojo structs.

Previously, Clone methods were only generated for mojo structs where all
fields were cloneable. However, for typemapped types, the bindings
generator is not aware of whether the native type is copyable and so it
treated all typemapped types as not cloneable.

This changes the Clone method to be templated so it is only compiled if
used so all mojo structs can contain a Clone method that will be usable
only if all fields are cloneable.

Review-Url: https://codereview.chromium.org/2012693002
Cr-Commit-Position: refs/heads/master@{#396608}


CrOS-Libchrome-Original-Commit: fb981f58c60cd22364da2f8f5b4171f45edbe1fb
4 files changed
tree: a4543883ff18ab18a5fb207cafe85b27166a1b3c
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/