DescriptionMojo cpp bindings: support Clone() for structs and arrays which don't contain handles.
With this CL you can do:
// It is safe to call even if foo.is_null() is true.
FooStructPtr foo_clone = foo.Clone();
Array<Bar> bar_array_clone = bar_array.Clone();
If you call Clone() with a struct or array type which (transitively) contains handles, you will get a compile-time error:
'Clone' : is not a member of 'FooStruct'.
BUG=None
TEST=Newly added tests in array_unittest and struct_unittest
Committed: https://crrev.com/a3f0198fc0a56f1a3c2ffb8384ecf9c40f649b87
Cr-Commit-Position: refs/heads/master@{#297890}
Patch Set 1 #Patch Set 2 : add a few more tests #Patch Set 3 : #
Total comments: 5
Messages
Total messages: 22 (5 generated)
|