This is an archive of the discontinued LLVM Phabricator instance.

[Resubmitted] Remove uses of deprecated std::unary_function, binary_function, and pointer_to_unary_function.
Needs ReviewPublic

Authored by coder0xff on Jul 29 2017, 10:42 AM.

Event Timeline

coder0xff created this revision.Jul 29 2017, 10:42 AM
dblaikie added inline comments.
include/llvm/ADT/STLExtras.h
61–62

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?

compnerd added inline comments.Aug 1 2017, 8:23 PM
include/llvm/ADT/STLExtras.h
61–62

Well, doing it this way makes it a NFC change. Plus, doing something like decltype to get the argument types adds a bit of unnecessary complexity though.

If there are no revisions requested, can this be accepted, please?

Ralith added a subscriber: Ralith.Oct 9 2017, 3:07 PM

What's the status of this? I have a project that's currently blocked from updating to clang 5 as it needs both C++17 and LLVM.

Any updates on this? I've found myself in the same situation as @Ralith, several months later.

Thanks!

Any updates on this? I've found myself in the same situation as @Ralith, several months later.

Thanks!

The LLVM 6 RC seems to have had uses of std::{unary,binary}_function removed, and builds under clang 6's C++17 configurations, so if you don't absolutely need LLVM 5 specifically this is soon to be a nonissue.

Any updates on this? I've found myself in the same situation as @Ralith, several months later.

Thanks!

The LLVM 6 RC seems to have had uses of std::{unary,binary}_function removed, and builds under clang 6's C++17 configurations, so if you don't absolutely need LLVM 5 specifically this is soon to be a nonissue.

Thanks for your response. I assumed that I'd be notified of responses by email but never was, so I didn't see it until now. I ended up updating to LLVM 6.0 after it was released and that solved my issue.