<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 29, 2017 at 4:31 PM Jakub Kuderski 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">kuhar added inline comments.<br>
<br>
<br>
================<br>
Comment at: unittests/IR/CFGBuilder.cpp:33-35<br>
+bool llvm::operator<(const CFGBuilder::Arc &LHS, const CFGBuilder::Arc &RHS) {<br>
+  return std::tie(LHS.From, LHS.To) < std::tie(RHS.From, RHS.To);<br>
+}<br>
----------------<br>
dblaikie wrote:<br>
> Oh, you could still have this inline in the header - just important that it's not a member function. It doesn't need to be a friend though, since this is a struct with only public members.<br>
><br>
> But if you do declare it as a friend (though it's not necessary/might be slightly confusing to a reader "why is this a friend if there's nothing private to access?") you can define it inline at the friend declaration - which keeps it written right where it was when it was a member function, close to the type it's defined for, etc, which is nice.<br>
The thing is that I keep Arcs in a `std::set`, which uses the less-than operator and I think that it needs to be declared before using it.<br></blockquote><div><br>Ah, yep. That is tricky/awkward.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
And if I go with declaring it inline, then I'll also have to pull in the entire `<tuple>`. I'm not  sure if something includes it transitively -- if that's the case, I'm more than happy to keep it inline.<br></blockquote><div><br>Ah, sure sure - whatever suits you.<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/D34798" rel="noreferrer" target="_blank">https://reviews.llvm.org/D34798</a><br>
<br>
<br>
<br>
</blockquote></div></div>