Migrate from std::pointer_to_unary_function as it is removed in C++17

llvm-svn: 331097
This commit is contained in:
Fangrui Song 2018-04-28 00:12:02 +00:00
parent 03283ae9b7
commit 8c07d06da9
1 changed files with 2 additions and 4 deletions

View File

@ -114,10 +114,8 @@ public:
AtomRange(AtomVector<T> &v) : _v(v) {}
AtomRange(const AtomVector<T> &v) : _v(const_cast<AtomVector<T> &>(v)) {}
typedef std::pointer_to_unary_function<const OwningAtomPtr<T>&,
const T*> ConstDerefFn;
typedef std::pointer_to_unary_function<OwningAtomPtr<T>&, T*> DerefFn;
using ConstDerefFn = const T* (*)(const OwningAtomPtr<T>&);
using DerefFn = T* (*)(OwningAtomPtr<T>&);
typedef llvm::mapped_iterator<typename AtomVector<T>::const_iterator,
ConstDerefFn> ConstItTy;