OSDN Git Service

Add partial implementation of std::to_address() as llvm::to_address()
authorDaniel Sanders <daniel_l_sanders@apple.com>
Wed, 20 Feb 2019 18:08:48 +0000 (18:08 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Wed, 20 Feb 2019 18:08:48 +0000 (18:08 +0000)
commite8f99139bba5b757c6ee4b6a2fd58a492f01da43
tree599812e4d131add24680702f20996231bcae3f3d
parent68782b8c5a362068fe6363066d038210ed0ff711
Add partial implementation of std::to_address() as llvm::to_address()

Summary:
Following on from the review for D58088, this patch provides the
prerequisite to_address() implementation that's needed to have
pointer_iterator support unique_ptr.

The late bound return should be removed once we move to C++14 to better
align with the C++20 declaration. Also, this implementation can be removed
once we move to C++20 where it's defined as std::to_addres()

The std::pointer_traits<>::to_address(p) variations of these overloads has
not been implemented.

Reviewers: dblaikie, paquette

Reviewed By: dblaikie

Subscribers: dexonsmith, kristina, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D58421

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354491 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/STLExtras.h
unittests/ADT/STLExtrasTest.cpp