<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 1, 2017 at 8:23 PM Saleem Abdulrasool via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">compnerd added inline comments.<br>
<br>
<br>
================<br>
Comment at: include/llvm/ADT/STLExtras.h:61-62<br>
+struct identity {<br>
+  using argument_type = Ty;<br>
+  using result_type = Ty;<br>
+<br>
----------------<br>
dblaikie wrote:<br>
> Should these changes be adding all these typedefs? I assume the reason std::unary_function et. al. are deprecated is that callers should likely be using decltype & similar things to work here instead?<br>
Well, doing it this way makes it a NFC change. </blockquote><div><br>Doing it the other way should still be NFC overall, but yeah, it's more work - and ideally should migrate the users first, to the point where the typedefs aren't needed, then drop the base classes without any replacement, etc.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Plus, doing something like decltype to get the argument types adds a bit of unnecessary complexity though.<br></blockquote><div><br>Not sure about that - by using decltype in the users - those users will generalize over any functor, not just those that provide these typedefs. Typedefs that will become increasingly rare given the deprecation.<br><br>- Dave<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<a href="https://reviews.llvm.org/D36049" rel="noreferrer" target="_blank">https://reviews.llvm.org/D36049</a><br>
<br>
<br>
<br>
</blockquote></div></div>