[libcxx] Implement http://wg21.link/p1006, constexpr in pointer_traits

Summary:
P1006 adds support for constexpr in the specialization of pointer_traits
for raw pointers. This is necessary in order to use pointer_traits in
the upcoming constexpr containers. We expect P1006 to be voted into the
working draft for C++20 at the San Diego meeting.

Reviewers: mclow.lists, EricWF

Subscribers: christof, dexonsmith, libcxx-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@346764 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/memory b/include/memory
index 783d94c..9fca9fe 100644
--- a/include/memory
+++ b/include/memory
@@ -43,7 +43,7 @@
 
     template <class U> using rebind = U*;
 
-    static pointer pointer_to(<details>) noexcept;
+    static pointer pointer_to(<details>) noexcept; // constexpr in C++20
 };
 
 template <class T> constexpr T* to_address(T* p) noexcept; // C++20
@@ -984,7 +984,7 @@
 private:
     struct __nat {};
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
     static pointer pointer_to(typename conditional<is_void<element_type>::value,
                                       __nat, element_type>::type& __r) _NOEXCEPT
         {return _VSTD::addressof(__r);}