[PATCH] D16962: clang-tidy: avoid std::bind
Arthur O'Dwyer via cfe-commits
cfe-commits at lists.llvm.org
Wed May 4 14:40:32 PDT 2016
On Wed, May 4, 2016 at 1:43 PM, Aaron Ballman via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> jbcoe wrote:
> > aaron.ballman wrote:
> > > I believe we use "modernize" to really mean "migrate from the old way
> to the new way", which this definitely fits into since I think the point to
> this check is to replace bind with better alternatives.
> > Would you prefer it to be in `modernize`? I can be easily convinced
> either way and am happy to move it. If I do move it I might add a script to
> facilitate doing so.
> My preference is for modernize, your preference is for readability, so I
> say: make @alexfh the tie-breaker! ;-) Alex, what are your thoughts? This
> seems like a heuristic we may want to state in our documentation to help
> others decide where to put new checks in the future as well.
FWIW, I'd prefer "modernize", and I'll point out that these waters are
muddied by the fact that three of the old ways (boost::bind, std::bind1st,
std::bind2nd) all existed prior to C++11, so the fact that *one* of the old
ways (std::bind) was introduced in C++11 doesn't matter so much.
(I haven't looked, but I'd assume that this clang-tidy check catches all
four cases, right?)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits