[PATCH] STLExtras: Provide less/equal functors with templated function call operators, plus a deref'ing functor template utility

David Blaikie dblaikie at gmail.com
Sun Feb 1 17:41:12 PST 2015


On Sun, Feb 1, 2015 at 5:01 PM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:

>
> > On 2015 Feb 1, at 16:59, David Blaikie <dblaikie at gmail.com> wrote:
> >
> >
> >
> > On Sun, Feb 1, 2015 at 4:52 PM, Duncan P. N. Exon Smith <
> dexonsmith at apple.com> wrote:
> >
> > > On 2015 Feb 1, at 16:02, David Blaikie <dblaikie at gmail.com> wrote:
> > >
> > > Formatting and comments
> > >
> > >
> > > http://reviews.llvm.org/D7324
> > >
> > > Files:
> > >  include/llvm/ADT/STLExtras.h
> > >  utils/TableGen/CodeGenRegisters.cpp
> > >  utils/TableGen/CodeGenRegisters.h
> > >  utils/TableGen/RegisterInfoEmitter.cpp
> > >
> > > EMAIL PREFERENCES
> > >  http://reviews.llvm.org/settings/panel/emailpreferences/
> > > <D7324.19120.patch>
> >
> > It's a slight shame to lose the `assert()`s in `Less` and `Equal`, but
> > given that we have the ASan bots they were probably low value anyway.
> >
> > Oh, meant to add/mention that they could be added back into the
> deref::operator() template if desired.
>
> I was thinking that the assertions wouldn't work with smart pointers,
> but I suppose they usually have an `operator bool()` defined.
>
> I do prefer the asserting version.
>

Readded the assertions, removed perfect forwarding (since the expressions
are used more than once, perfect forwarding doesn't apply).


>
> > - David
> >
> >
> > LGTM.
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150201/a8cc22ce/attachment.html>


More information about the llvm-commits mailing list