Allow property setter function to take any arg type.
Instead of forcing ArgType<T>, just generically match a signature type. This allows classes to choose to implement e.g. by reference or value, at the cost of possibly-more-cryptic template errors when people don't implement a setter. We could probably give better errors than this with some helper structs to restrict to e.g. single-arg member functions whose arg is convertible from ArgType, but this seems good enough for now. Bug: none Change-Id: I079fd9dd5cd3cb51297855d2ccabde65148c0b6b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363562 Commit-Queue: Peter Kasting <pkasting@chromium.org> Reviewed-by:Wei Li <weili@chromium.org> Cr-Commit-Position: refs/heads/master@{#801146}
Showing
Please register or sign in to comment