<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 15, 2016 at 5:02 PM, Lang Hames via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">lhames added a comment.<br>
<span class=""><br>
> I think the ErrorHandlerTraits + test cases might be able to be simplified/reduced by implementing some more general and orthogonal constructs. If we had a trait for "arguments to a callable" (as is described here: <a href="http://stackoverflow.com/questions/21465394/accept-any-kind-of-callable-and-also-know-argument-type" rel="noreferrer" target="_blank">http://stackoverflow.com/questions/21465394/accept-any-kind-of-callable-and-also-know-argument-type</a> ) and then just used std::result_of, we could probably get away from this code having to worry about members V non-members, etc. Might be able to do the unique_ptr versus ref variants just with overloading & decltype to get the return type... it's a bit hand wavy, I realize, but happy to work through it in more detail if you like.<br>
<br>
<br>
</span>I think factoring out the argument-matching stuff into a general callable_traits class would be useful, and I'm happy to do it, . I need to do something like that anyway for some improvements I want to make to the RPC API. That said, I think we can do that post commit - I want to take some time to think about the right way to do it, and I don't want to block the people who are waiting for this Error support to land.<br></blockquote><div><br></div><div>Rightio - yeah, it'd just be nice to cleanup soonish & cleanup the large combination of test cases once the implementation can be reduced in complexity by having more orthogonality around parameter and result types, etc. (once they're orthogonal in the implementation there's no need to test every combination, etc)<br><br>Sounds good.<br><br>Otherwise this looks good to commit whenever you're ready - we can iterate on the rest post commit.<br><br>- Dave</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
<br>
<a href="http://reviews.llvm.org/D17778" rel="noreferrer" target="_blank">http://reviews.llvm.org/D17778</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>