<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 13, 2015 at 3:07 PM, Pete Cooper <span dir="ltr"><<a href="mailto:peter_cooper@apple.com" target="_blank">peter_cooper@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">It compiled fine.  Running ‘make check-all’ now.  If it passes with this single version then are you ok with me committing?</div></blockquote><div><br>Yep, let's go with that. I feel better about it so we're not committing completely dead/untested code.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="color:#bb2ca2">template</span><<span style="color:#bb2ca2">typename</span> R, <span style="color:#bb2ca2">class</span> UnaryPredicate></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="color:#bb2ca2">bool</span> all_of(R &&Range, UnaryPredicate &&P) {</div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">  <span style="color:#bb2ca2">return</span> <span style="color:#703daa">std</span>::all_of(Range.begin(), Range.end(),</div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">                     <span style="color:#703daa">std</span>::forward<UnaryPredicate>(P));</div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">}</div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">Cheers,</div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">Pete</div><div><div class="h5"><div><blockquote type="cite"><div>On May 13, 2015, at 2:54 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Drop the static inline (the static part would cause ODR violations in other inline functions in headers that call this function, the inline part is mostly redundant because it just changes the linkage which implicit template specializations already have anyway)<br><br>Wonder if there's a way to get these down to one implementation...<br><br><div>template<typename Range, class UnaryPredicate></div><div>bool all_of(Range &&R, UnaryPredicate &&P) {</div><div>  return std::all_of(R.begin(), R.end(), std::forward<UnaryPredicate>(P));</div><div>}<br><br>Maybe?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 13, 2015 at 2:41 PM, Pete Cooper <span dir="ltr"><<a href="mailto:peter_cooper@apple.com" target="_blank">peter_cooper@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hey David<div><br></div><div>(For the benefit of mailing archives, this is a spin-off from a discussion on <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150511/276283.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150511/276283.html</a>)</div><div><br></div><div>This is the patch we discussed to add an llvm version of std::all_of which doesn’t need begin/end.  Also added a user of it to LoopInfo which was the motivating example you pointed out.</div><div><br></div><div>Comments welcome.</div><div><br></div><div>Cheers,</div><div>Pete</div><div><br></div><div></div></div><br><div style="word-wrap:break-word"><div></div></div><br></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div></blockquote></div><br></div></div>