[libcxx-commits] [libcxx] d868135 - [libc++] Qualifies ptrdiff_t and max_align_t.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 22 09:28:08 PDT 2023


Author: Mark de Wever
Date: 2023-03-22T17:27:57+01:00
New Revision: d868135691bb0d5c924b8fd2ae26171fbf5d1387

URL: https://github.com/llvm/llvm-project/commit/d868135691bb0d5c924b8fd2ae26171fbf5d1387
DIFF: https://github.com/llvm/llvm-project/commit/d868135691bb0d5c924b8fd2ae26171fbf5d1387.diff

LOG: [libc++] Qualifies ptrdiff_t and max_align_t.

This has been done using the following commands
  find libcxx/test -type f -exec perl -pi -e 's|^([^/]+?)((?<!::)ptrdiff_t)|\1std::\2|' \{} \;
  find libcxx/test -type f -exec perl -pi -e 's|^([^/]+?)((?<!::)max_align_t)|\1std::\2|' \{} \;

The std module doesn't export declarations in the global namespaace.,
This is a preparation for that module.

Reviewed By: #libc, ldionne

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

Added: 
    

Modified: 
    libcxx/test/libcxx/algorithms/debug_less.pass.cpp
    libcxx/test/libcxx/numerics/numeric.ops/midpoint.integer.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/ranges.find_first_of.pass.cpp
    libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
    libcxx/test/std/atomics/types.pass.cpp
    libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp
    libcxx/test/std/iterators/iterator.container/ssize.pass.cpp
    libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_move.pass.cpp
    libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_swap.pass.cpp
    libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cmp/sfinae.compile.pass.cpp
    libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_move.pass.cpp
    libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_swap.pass.cpp
    libcxx/test/std/language.support/support.types/max_align_t.compile.pass.cpp
    libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp
    libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp
    libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp
    libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp
    libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp
    libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp
    libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp
    libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp
    libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp
    libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp
    libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp
    libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.integer.pass.cpp
    libcxx/test/std/ranges/range.access/ssize.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/constraints.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_move.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_swap.pass.cpp
    libcxx/test/std/strings/string.view/types.pass.cpp
    libcxx/test/std/thread/thread.semaphore/max.pass.cpp
    libcxx/test/std/utilities/format/format.functions/escaped_output.ascii.pass.cpp
    libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp
    libcxx/test/std/utilities/format/format.range/format.range.fmtkind/format_kind.compile.pass.cpp
    libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.pass.cpp
    libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_bytes.pass.cpp
    libcxx/test/support/test_iterators.h

Removed: 
    


################################################################################
diff  --git a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp
index 4d6422a07a020..6085aa9c65d31 100644
--- a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp
@@ -207,7 +207,7 @@ void test_non_const_arg_cmp() {
 struct ValueIterator {
     typedef std::input_iterator_tag iterator_category;
     typedef std::size_t value_type;
-    typedef ptr
diff _t 
diff erence_type;
+    typedef std::ptr
diff _t 
diff erence_type;
     typedef std::size_t reference;
     typedef std::size_t* pointer;
 

diff  --git a/libcxx/test/libcxx/numerics/numeric.ops/midpoint.integer.pass.cpp b/libcxx/test/libcxx/numerics/numeric.ops/midpoint.integer.pass.cpp
index 8df3f8ad8cade..302948756b198 100644
--- a/libcxx/test/libcxx/numerics/numeric.ops/midpoint.integer.pass.cpp
+++ b/libcxx/test/libcxx/numerics/numeric.ops/midpoint.integer.pass.cpp
@@ -62,7 +62,7 @@ int main(int, char**)
 #endif
 
     test<char>();
-    test<ptr
diff _t>();
+    test<std::ptr
diff _t>();
     test<std::size_t>();
 
     return 0;

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/ranges.find_first_of.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/ranges.find_first_of.pass.cpp
index 5673c70c394b4..cea30420428cd 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/ranges.find_first_of.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/ranges.find_first_of.pass.cpp
@@ -71,7 +71,7 @@ template <int N1, int N2>
 struct Data {
   std::array<int, N1> input1;
   std::array<int, N2> input2;
-  ptr
diff _t expected;
+  std::ptr
diff _t expected;
 };
 
 template <class Iter1, class Sent1, class Iter2, class Sent2, int N1, int N2>

diff  --git a/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp b/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
index 84f49a76a810f..3121e7c57bafe 100644
--- a/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
+++ b/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
@@ -203,7 +203,7 @@ void f() {
   static_assert(std::is_same_v<std::atomic<intptr_t>,  ::atomic_intptr_t>);
   static_assert(std::is_same_v<std::atomic<uintptr_t>, ::atomic_uintptr_t>);
   static_assert(std::is_same_v<std::atomic<std::size_t>,    ::atomic_size_t>);
-  static_assert(std::is_same_v<std::atomic<ptr
diff _t>, ::atomic_ptr
diff _t>);
+  static_assert(std::is_same_v<std::atomic<std::ptr
diff _t>, ::atomic_ptr
diff _t>);
   static_assert(std::is_same_v<std::atomic<intmax_t>,  ::atomic_intmax_t>);
   static_assert(std::is_same_v<std::atomic<uintmax_t>, ::atomic_uintmax_t>);
 

diff  --git a/libcxx/test/std/atomics/types.pass.cpp b/libcxx/test/std/atomics/types.pass.cpp
index e0b617071c04f..63ab0f30c4a75 100644
--- a/libcxx/test/std/atomics/types.pass.cpp
+++ b/libcxx/test/std/atomics/types.pass.cpp
@@ -61,7 +61,7 @@ struct test_atomic<A*, false>
         A a; (void)a;
 #if TEST_STD_VER >= 17
     static_assert((std::is_same_v<typename A::value_type, decltype(a.load())>), "");
-    static_assert((std::is_same_v<typename A::
diff erence_type, ptr
diff _t>), "");
+    static_assert((std::is_same_v<typename A::
diff erence_type, std::ptr
diff _t>), "");
 #endif
     }
 };
@@ -149,7 +149,7 @@ int main(int, char**)
     test<intptr_t>  ();
     test<uintptr_t> ();
     test<std::size_t>    ();
-    test<ptr
diff _t> ();
+    test<std::ptr
diff _t> ();
     test<intmax_t>  ();
     test<uintmax_t> ();
 

diff  --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp
index 527c72c1e7c8d..f2ab6e5faa19d 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp
@@ -19,21 +19,21 @@
 #include "test_macros.h"
 #include "min_allocator.h"
 
-typedef ptr
diff _t T;
+typedef std::ptr
diff _t T;
 const T t1[] = {0, 1, 2, 3, 4, 5, 6, 7};
 const T t2[] = {10, 11, 12, 13, 14, 15};
-const ptr
diff _t size_t1 = std::end(t1) - std::begin(t1);
-const ptr
diff _t size_t2 = std::end(t2) - std::begin(t2);
+const std::ptr
diff _t size_t1 = std::end(t1) - std::begin(t1);
+const std::ptr
diff _t size_t2 = std::end(t2) - std::begin(t2);
 
 template <class C>
 void
-testd(const C& c, ptr
diff _t p, ptr
diff _t f, ptr
diff _t l)
+testd(const C& c, std::ptr
diff _t p, ptr
diff _t f, ptr
diff _t l)
 {
     typename C::const_iterator i = c.begin();
-    ptr
diff _t n1 = 0;
+    std::ptr
diff _t n1 = 0;
     for (; n1 < p; ++n1, ++i)
         assert(*i == t1[n1]);
-    for (ptr
diff _t n2 = f; n2 < l-1; ++n2, ++i)
+    for (std::ptr
diff _t n2 = f; n2 < l-1; ++n2, ++i)
         assert(*i == t2[n2]);
     for (; n1 < size_t1; ++n1, ++i)
         assert(*i == t1[n1]);
@@ -42,11 +42,11 @@ testd(const C& c, ptr
diff _t p, ptr
diff _t f, ptr
diff _t l)
 
 template <class C>
 void
-tests(const C& c, ptr
diff _t p, ptr
diff _t f, ptr
diff _t l)
+tests(const C& c, std::ptr
diff _t p, ptr
diff _t f, ptr
diff _t l)
 {
     typename C::const_iterator i = c.begin();
-    ptr
diff _t n = 0;
-    ptr
diff _t d = l > f+1 ? l-1-f : 0;
+    std::ptr
diff _t n = 0;
+    std::ptr
diff _t d = l > f+1 ? l-1-f : 0;
     if (d == 0 || p == f)
     {
         for (n = 0; n < size_t1; ++n, ++i)
@@ -82,11 +82,11 @@ int main(int, char**)
     {
     // splicing 
diff erent containers
     typedef std::forward_list<T> C;
-    for (ptr
diff _t f = 0; f <= size_t2+1; ++f)
+    for (std::ptr
diff _t f = 0; f <= size_t2+1; ++f)
     {
-        for (ptr
diff _t l = f; l <= size_t2+1; ++l)
+        for (std::ptr
diff _t l = f; l <= size_t2+1; ++l)
         {
-            for (ptr
diff _t p = 0; p <= size_t1; ++p)
+            for (std::ptr
diff _t p = 0; p <= size_t1; ++p)
             {
                 C c1(std::begin(t1), std::end(t1));
                 C c2(std::begin(t2), std::end(t2));
@@ -99,11 +99,11 @@ int main(int, char**)
     }
 
     // splicing within same container
-    for (ptr
diff _t f = 0; f <= size_t1+1; ++f)
+    for (std::ptr
diff _t f = 0; f <= size_t1+1; ++f)
     {
-        for (ptr
diff _t l = f; l <= size_t1; ++l)
+        for (std::ptr
diff _t l = f; l <= size_t1; ++l)
         {
-            for (ptr
diff _t p = 0; p <= f; ++p)
+            for (std::ptr
diff _t p = 0; p <= f; ++p)
             {
                 C c1(std::begin(t1), std::end(t1));
 
@@ -111,7 +111,7 @@ int main(int, char**)
                       std::next(c1.cbefore_begin(), f), std::next(c1.cbefore_begin(), l));
                 tests(c1, p, f, l);
             }
-            for (ptr
diff _t p = l; p <= size_t1; ++p)
+            for (std::ptr
diff _t p = l; p <= size_t1; ++p)
             {
                 C c1(std::begin(t1), std::end(t1));
 
@@ -126,11 +126,11 @@ int main(int, char**)
     {
     // splicing 
diff erent containers
     typedef std::forward_list<T, min_allocator<T>> C;
-    for (ptr
diff _t f = 0; f <= size_t2+1; ++f)
+    for (std::ptr
diff _t f = 0; f <= size_t2+1; ++f)
     {
-        for (ptr
diff _t l = f; l <= size_t2+1; ++l)
+        for (std::ptr
diff _t l = f; l <= size_t2+1; ++l)
         {
-            for (ptr
diff _t p = 0; p <= size_t1; ++p)
+            for (std::ptr
diff _t p = 0; p <= size_t1; ++p)
             {
                 C c1(std::begin(t1), std::end(t1));
                 C c2(std::begin(t2), std::end(t2));
@@ -143,11 +143,11 @@ int main(int, char**)
     }
 
     // splicing within same container
-    for (ptr
diff _t f = 0; f <= size_t1+1; ++f)
+    for (std::ptr
diff _t f = 0; f <= size_t1+1; ++f)
     {
-        for (ptr
diff _t l = f; l <= size_t1; ++l)
+        for (std::ptr
diff _t l = f; l <= size_t1; ++l)
         {
-            for (ptr
diff _t p = 0; p <= f; ++p)
+            for (std::ptr
diff _t p = 0; p <= f; ++p)
             {
                 C c1(std::begin(t1), std::end(t1));
 
@@ -155,7 +155,7 @@ int main(int, char**)
                       std::next(c1.cbefore_begin(), f), std::next(c1.cbefore_begin(), l));
                 tests(c1, p, f, l);
             }
-            for (ptr
diff _t p = l; p <= size_t1; ++p)
+            for (std::ptr
diff _t p = l; p <= size_t1; ++p)
             {
                 C c1(std::begin(t1), std::end(t1));
 

diff  --git a/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp b/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp
index 9be44094a099c..e7531aec12b24 100644
--- a/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp
@@ -100,7 +100,7 @@ int main(int, char**)
     test_const_container ( sv );
 
     static constexpr int arrA [] { 1, 2, 3 };
-    ASSERT_SAME_TYPE(ptr
diff _t, decltype(std::ssize(arrA)));
+    ASSERT_SAME_TYPE(std::ptr
diff _t, decltype(std::ssize(arrA)));
     static_assert( std::is_signed_v<decltype(std::ssize(arrA))>, "");
     test_const_array ( arrA );
 

diff  --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_move.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_move.pass.cpp
index a9e6d17720ab3..e0f63ac594367 100644
--- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_move.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_move.pass.cpp
@@ -28,7 +28,7 @@ template <bool IsNoexcept>
 struct MaybeNoexceptMove {
   int x;
   using value_type = int;
-  using 
diff erence_type = ptr
diff _t;
+  using 
diff erence_type = std::ptr
diff _t;
 
   constexpr friend value_type&& iter_move(MaybeNoexceptMove) noexcept(IsNoexcept) {
     return std::move(global);

diff  --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_swap.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_swap.pass.cpp
index 075930dcb0a07..aa0815390391c 100644
--- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_swap.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_swap.pass.cpp
@@ -26,7 +26,7 @@
 template <bool IsNoexcept>
 struct MaybeNoexceptSwap {
   using value_type = int;
-  using 
diff erence_type = ptr
diff _t;
+  using 
diff erence_type = std::ptr
diff _t;
 
   constexpr friend void iter_swap(MaybeNoexceptSwap, MaybeNoexceptSwap) noexcept(IsNoexcept) {
   }

diff  --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cmp/sfinae.compile.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cmp/sfinae.compile.pass.cpp
index 92e0e5cd8f9fa..8ead39231c0ba 100644
--- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cmp/sfinae.compile.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cmp/sfinae.compile.pass.cpp
@@ -49,7 +49,7 @@
 struct IterBase {
   using iterator_category = std::bidirectional_iterator_tag;
   using value_type = int;
-  using 
diff erence_type = ptr
diff _t;
+  using 
diff erence_type = std::ptr
diff _t;
   using pointer = int*;
   using reference = int&;
 

diff  --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_move.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_move.pass.cpp
index 712425a0c44ff..5e35f5c8facc4 100644
--- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_move.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_move.pass.cpp
@@ -55,7 +55,7 @@ constexpr bool test() {
     {
       struct ThrowingCopyNoexceptDecrement {
         using value_type = int;
-        using 
diff erence_type = ptr
diff _t;
+        using 
diff erence_type = std::ptr
diff _t;
 
         ThrowingCopyNoexceptDecrement();
         ThrowingCopyNoexceptDecrement(const ThrowingCopyNoexceptDecrement&);
@@ -80,7 +80,7 @@ constexpr bool test() {
     {
       struct NoexceptCopyThrowingDecrement {
         using value_type = int;
-        using 
diff erence_type = ptr
diff _t;
+        using 
diff erence_type = std::ptr
diff _t;
 
         NoexceptCopyThrowingDecrement();
         NoexceptCopyThrowingDecrement(const NoexceptCopyThrowingDecrement&) noexcept;
@@ -105,7 +105,7 @@ constexpr bool test() {
     {
       struct NoexceptCopyAndDecrement {
         using value_type = int;
-        using 
diff erence_type = ptr
diff _t;
+        using 
diff erence_type = std::ptr
diff _t;
 
         NoexceptCopyAndDecrement();
         NoexceptCopyAndDecrement(const NoexceptCopyAndDecrement&) noexcept;

diff  --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_swap.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_swap.pass.cpp
index d01ee2a1b85a1..7b6fb43b0001f 100644
--- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_swap.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_swap.pass.cpp
@@ -61,7 +61,7 @@ constexpr bool test() {
     {
       struct ThrowingCopyNoexceptDecrement {
         using value_type = int;
-        using 
diff erence_type = ptr
diff _t;
+        using 
diff erence_type = std::ptr
diff _t;
 
         ThrowingCopyNoexceptDecrement();
         ThrowingCopyNoexceptDecrement(const ThrowingCopyNoexceptDecrement&);
@@ -89,7 +89,7 @@ constexpr bool test() {
     {
       struct NoexceptCopyThrowingDecrement {
         using value_type = int;
-        using 
diff erence_type = ptr
diff _t;
+        using 
diff erence_type = std::ptr
diff _t;
 
         NoexceptCopyThrowingDecrement();
         NoexceptCopyThrowingDecrement(const NoexceptCopyThrowingDecrement&) noexcept;
@@ -117,7 +117,7 @@ constexpr bool test() {
     {
       struct NoexceptCopyAndDecrement {
         using value_type = int;
-        using 
diff erence_type = ptr
diff _t;
+        using 
diff erence_type = std::ptr
diff _t;
 
         NoexceptCopyAndDecrement();
         NoexceptCopyAndDecrement(const NoexceptCopyAndDecrement&) noexcept;

diff  --git a/libcxx/test/std/language.support/support.types/max_align_t.compile.pass.cpp b/libcxx/test/std/language.support/support.types/max_align_t.compile.pass.cpp
index aef00bbc0ddac..5e335841c2a3c 100644
--- a/libcxx/test/std/language.support/support.types/max_align_t.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.types/max_align_t.compile.pass.cpp
@@ -26,5 +26,5 @@ static_assert(alignof(std::max_align_t) >= alignof(long double), "");
 static_assert(alignof(std::max_align_t) >= alignof(void*), "");
 #if TEST_STD_VER > 14
 static_assert(alignof(std::max_align_t) <= __STDCPP_DEFAULT_NEW_ALIGNMENT__,
-              "max_align_t alignment should be no larger than operator new's alignment");
+              "std::max_align_t alignment should be no larger than operator new's alignment");
 #endif

diff  --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp
index 0da878d0b1f17..cbaf5dfbec19c 100644
--- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp
@@ -90,7 +90,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int64_t>);
     static_assert(!std::is_invocable_v<L, intmax_t>);
     static_assert(!std::is_invocable_v<L, intptr_t>);
-    static_assert(!std::is_invocable_v<L, ptr
diff _t>);
+    static_assert(!std::is_invocable_v<L, std::ptr
diff _t>);
 
     static_assert(!std::is_invocable_v<L, bool>);
     static_assert(!std::is_invocable_v<L, char>);

diff  --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp
index 41d5ed1e06017..473238be5e92c 100644
--- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp
@@ -87,7 +87,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int64_t>);
     static_assert(!std::is_invocable_v<L, intmax_t>);
     static_assert(!std::is_invocable_v<L, intptr_t>);
-    static_assert(!std::is_invocable_v<L, ptr
diff _t>);
+    static_assert(!std::is_invocable_v<L, std::ptr
diff _t>);
 
     static_assert(!std::is_invocable_v<L, bool>);
     static_assert(!std::is_invocable_v<L, char>);

diff  --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp
index 53fdec6bd2076..8110048e13960 100644
--- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp
@@ -92,7 +92,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int64_t>);
     static_assert(!std::is_invocable_v<L, intmax_t>);
     static_assert(!std::is_invocable_v<L, intptr_t>);
-    static_assert(!std::is_invocable_v<L, ptr
diff _t>);
+    static_assert(!std::is_invocable_v<L, std::ptr
diff _t>);
 
     static_assert(!std::is_invocable_v<L, bool>);
     static_assert(!std::is_invocable_v<L, char>);

diff  --git a/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp
index 044a87fa41352..1c30f5cec5191 100644
--- a/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp
@@ -90,7 +90,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int64_t>);
     static_assert(!std::is_invocable_v<L, intmax_t>);
     static_assert(!std::is_invocable_v<L, intptr_t>);
-    static_assert(!std::is_invocable_v<L, ptr
diff _t>);
+    static_assert(!std::is_invocable_v<L, std::ptr
diff _t>);
 
     static_assert(!std::is_invocable_v<L, bool>);
     static_assert(!std::is_invocable_v<L, char>);

diff  --git a/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp
index 06a8a6d6cc879..b236e37ee8791 100644
--- a/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp
@@ -87,7 +87,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int64_t>);
     static_assert(!std::is_invocable_v<L, intmax_t>);
     static_assert(!std::is_invocable_v<L, intptr_t>);
-    static_assert(!std::is_invocable_v<L, ptr
diff _t>);
+    static_assert(!std::is_invocable_v<L, std::ptr
diff _t>);
 
     static_assert(!std::is_invocable_v<L, bool>);
     static_assert(!std::is_invocable_v<L, char>);

diff  --git a/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp
index 5a30e57c409a6..58c953f0b97a8 100644
--- a/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp
@@ -86,7 +86,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int64_t>);
     static_assert(!std::is_invocable_v<L, intmax_t>);
     static_assert(!std::is_invocable_v<L, intptr_t>);
-    static_assert(!std::is_invocable_v<L, ptr
diff _t>);
+    static_assert(!std::is_invocable_v<L, std::ptr
diff _t>);
 
     static_assert(!std::is_invocable_v<L, bool>);
     static_assert(!std::is_invocable_v<L, char>);

diff  --git a/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp
index 1698e31086ea4..208e694e0282a 100644
--- a/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp
@@ -91,7 +91,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int64_t>);
     static_assert(!std::is_invocable_v<L, intmax_t>);
     static_assert(!std::is_invocable_v<L, intptr_t>);
-    static_assert(!std::is_invocable_v<L, ptr
diff _t>);
+    static_assert(!std::is_invocable_v<L, std::ptr
diff _t>);
 
     static_assert(!std::is_invocable_v<L, bool>);
     static_assert(!std::is_invocable_v<L, char>);

diff  --git a/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp
index 91fbab8bbed84..0d14d9e71044b 100644
--- a/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp
@@ -88,7 +88,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int64_t>);
     static_assert(!std::is_invocable_v<L, intmax_t>);
     static_assert(!std::is_invocable_v<L, intptr_t>);
-    static_assert(!std::is_invocable_v<L, ptr
diff _t>);
+    static_assert(!std::is_invocable_v<L, std::ptr
diff _t>);
 
     static_assert(!std::is_invocable_v<L, bool>);
     static_assert(!std::is_invocable_v<L, char>);

diff  --git a/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp
index 00e60ff588176..383338a2f21bd 100644
--- a/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp
@@ -98,7 +98,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int64_t>);
     static_assert(!std::is_invocable_v<L, intmax_t>);
     static_assert(!std::is_invocable_v<L, intptr_t>);
-    static_assert(!std::is_invocable_v<L, ptr
diff _t>);
+    static_assert(!std::is_invocable_v<L, std::ptr
diff _t>);
 
     static_assert(!std::is_invocable_v<L, bool>);
     static_assert(!std::is_invocable_v<L, char>);

diff  --git a/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp b/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp
index 5fe63e47403c4..6cc1410eb682f 100644
--- a/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp
@@ -86,7 +86,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int64_t>);
     static_assert(!std::is_invocable_v<L, intmax_t>);
     static_assert(!std::is_invocable_v<L, intptr_t>);
-    static_assert(!std::is_invocable_v<L, ptr
diff _t>);
+    static_assert(!std::is_invocable_v<L, std::ptr
diff _t>);
 
     static_assert(!std::is_invocable_v<L, bool>);
     static_assert(!std::is_invocable_v<L, char>);

diff  --git a/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp b/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp
index 1b63540cd8c45..b218bb0397335 100644
--- a/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp
@@ -87,7 +87,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int64_t>);
     static_assert(!std::is_invocable_v<L, intmax_t>);
     static_assert(!std::is_invocable_v<L, intptr_t>);
-    static_assert(!std::is_invocable_v<L, ptr
diff _t>);
+    static_assert(!std::is_invocable_v<L, std::ptr
diff _t>);
 
     static_assert(!std::is_invocable_v<L, bool>);
     static_assert(!std::is_invocable_v<L, char>);

diff  --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.integer.pass.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.integer.pass.cpp
index 03f3bdaf2d561..c506d0776a02c 100644
--- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.integer.pass.cpp
+++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.integer.pass.cpp
@@ -137,7 +137,7 @@ int main(int, char**)
 #endif
 
 //     int_test<char>();
-    signed_test<ptr
diff _t>();
+    signed_test<std::ptr
diff _t>();
     unsigned_test<std::size_t>();
 
     return 0;

diff  --git a/libcxx/test/std/ranges/range.access/ssize.pass.cpp b/libcxx/test/std/ranges/range.access/ssize.pass.cpp
index a15dc344512a1..ac2c5b7b6b764 100644
--- a/libcxx/test/std/ranges/range.access/ssize.pass.cpp
+++ b/libcxx/test/std/ranges/range.access/ssize.pass.cpp
@@ -71,7 +71,7 @@ constexpr bool test() {
   // This gets converted to ptr
diff _t because it's wider.
   ShortUnsignedReturnType c;
   assert(std::ranges::ssize(c) == 42);
-  ASSERT_SAME_TYPE(decltype(std::ranges::ssize(c)), ptr
diff _t);
+  ASSERT_SAME_TYPE(decltype(std::ranges::ssize(c)), std::ptr
diff _t);
 
   return true;
 }

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/constraints.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/constraints.compile.pass.cpp
index 122abe6315c11..a942f43904092 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/constraints.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/constraints.compile.pass.cpp
@@ -66,7 +66,7 @@ namespace test3 {
 
   struct AlmostInputIterator {
     using value_type = char;
-    using 
diff erence_type = ptr
diff _t;
+    using 
diff erence_type = std::ptr
diff _t;
     using iterator_concept = int;
 
     constexpr const char& operator*() const;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_move.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_move.pass.cpp
index 3e5671936191e..f9d2b3e7f8950 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_move.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_move.pass.cpp
@@ -23,7 +23,7 @@ namespace adl {
 template <bool IsNoexcept = false>
 struct MaybeNoexceptIterator {
   using value_type = int;
-  using 
diff erence_type = ptr
diff _t;
+  using 
diff erence_type = std::ptr
diff _t;
 
   value_type* ptr_ = nullptr;
   int* iter_move_invocations_ = nullptr;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_swap.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_swap.pass.cpp
index 7d0e8a78caedf..18fd3a31ce23c 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_swap.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_swap.pass.cpp
@@ -24,7 +24,7 @@ namespace adl {
 template <bool IsNoexcept = false>
 struct MaybeNoexceptIterator {
   using value_type = int;
-  using 
diff erence_type = ptr
diff _t;
+  using 
diff erence_type = std::ptr
diff _t;
 
   value_type* ptr_ = nullptr;
   int* iter_swap_invocations_ = nullptr;

diff  --git a/libcxx/test/std/strings/string.view/types.pass.cpp b/libcxx/test/std/strings/string.view/types.pass.cpp
index f952f20561230..25dc54d257409 100644
--- a/libcxx/test/std/strings/string.view/types.pass.cpp
+++ b/libcxx/test/std/strings/string.view/types.pass.cpp
@@ -47,7 +47,7 @@ test()
     static_assert((std::is_same<typename S::traits_type,     Traits>::value), "");
     static_assert((std::is_same<typename S::value_type,      typename Traits::char_type>::value), "");
     static_assert((std::is_same<typename S::size_type,       std::size_t>::value), "");
-    static_assert((std::is_same<typename S::
diff erence_type, ptr
diff _t>::value), "");
+    static_assert((std::is_same<typename S::
diff erence_type, std::ptr
diff _t>::value), "");
     static_assert((std::is_same<typename S::reference,             typename S::value_type&>::value), "");
     static_assert((std::is_same<typename S::const_reference, const typename S::value_type&>::value), "");
     static_assert((std::is_same<typename S::pointer,               typename S::value_type*>::value), "");

diff  --git a/libcxx/test/std/thread/thread.semaphore/max.pass.cpp b/libcxx/test/std/thread/thread.semaphore/max.pass.cpp
index 5a3026bc351e9..ca7ad0c92e60e 100644
--- a/libcxx/test/std/thread/thread.semaphore/max.pass.cpp
+++ b/libcxx/test/std/thread/thread.semaphore/max.pass.cpp
@@ -21,6 +21,6 @@ int main(int, char**)
   static_assert(std::counting_semaphore<>::max() >= 1, "");
   static_assert(std::counting_semaphore<1>::max() >= 1, "");
   static_assert(std::counting_semaphore<std::numeric_limits<int>::max()>::max() >= std::numeric_limits<int>::max(), "");
-  static_assert(std::counting_semaphore<std::numeric_limits<ptr
diff _t>::max()>::max() == std::numeric_limits<ptr
diff _t>::max(), "");
+  static_assert(std::counting_semaphore<std::numeric_limits<std::ptr
diff _t>::max()>::max() == std::numeric_limits<ptr
diff _t>::max(), "");
   return 0;
 }

diff  --git a/libcxx/test/std/utilities/format/format.functions/escaped_output.ascii.pass.cpp b/libcxx/test/std/utilities/format/format.functions/escaped_output.ascii.pass.cpp
index a3184e4cba4a0..5ceedf9f05c42 100644
--- a/libcxx/test/std/utilities/format/format.functions/escaped_output.ascii.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/escaped_output.ascii.pass.cpp
@@ -109,7 +109,7 @@ auto test_format_to_n =
         std::size_t n = expected.size();
         std::basic_string<CharT> out(n, CharT(' '));
         std::format_to_n_result result = std::format_to_n(out.begin(), n, fmt, std::forward<Args>(args)...);
-        assert(result.size == static_cast<ptr
diff _t>(expected.size()));
+        assert(result.size == static_cast<std::ptr
diff _t>(expected.size()));
         assert(result.out == out.end());
         assert(out == expected);
       }
@@ -119,24 +119,24 @@ auto test_format_to_n =
         std::basic_string<CharT> out(n, CharT(' '));
         std::format_to_n_result result =
             std::format_to_n(out.begin(), n, std::locale(), fmt, std::forward<Args>(args)...);
-        assert(result.size == static_cast<ptr
diff _t>(expected.size()));
+        assert(result.size == static_cast<std::ptr
diff _t>(expected.size()));
         assert(result.out == out.end());
         assert(out == expected);
       }
 #endif // TEST_HAS_NO_LOCALIZATION
       {
-        ptr
diff _t n = 0;
+        std::ptr
diff _t n = 0;
         std::basic_string<CharT> out;
         std::format_to_n_result result = std::format_to_n(out.begin(), n, fmt, std::forward<Args>(args)...);
-        assert(result.size == static_cast<ptr
diff _t>(expected.size()));
+        assert(result.size == static_cast<std::ptr
diff _t>(expected.size()));
         assert(result.out == out.end());
         assert(out.empty());
       }
       {
-        ptr
diff _t n = expected.size() / 2;
+        std::ptr
diff _t n = expected.size() / 2;
         std::basic_string<CharT> out(n, CharT(' '));
         std::format_to_n_result result = std::format_to_n(out.begin(), n, fmt, std::forward<Args>(args)...);
-        assert(result.size == static_cast<ptr
diff _t>(expected.size()));
+        assert(result.size == static_cast<std::ptr
diff _t>(expected.size()));
         assert(result.out == out.end());
         assert(out == expected.substr(0, n));
       }

diff  --git a/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp b/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp
index 0cb0257b8ea57..6d002a10c1479 100644
--- a/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp
@@ -115,7 +115,7 @@ auto test_format_to_n =
         std::size_t n = expected.size();
         std::basic_string<CharT> out(n, CharT(' '));
         std::format_to_n_result result = std::format_to_n(out.begin(), n, fmt, std::forward<Args>(args)...);
-        assert(result.size == static_cast<ptr
diff _t>(expected.size()));
+        assert(result.size == static_cast<std::ptr
diff _t>(expected.size()));
         assert(result.out == out.end());
         assert(out == expected);
       }
@@ -125,24 +125,24 @@ auto test_format_to_n =
         std::basic_string<CharT> out(n, CharT(' '));
         std::format_to_n_result result =
             std::format_to_n(out.begin(), n, std::locale(), fmt, std::forward<Args>(args)...);
-        assert(result.size == static_cast<ptr
diff _t>(expected.size()));
+        assert(result.size == static_cast<std::ptr
diff _t>(expected.size()));
         assert(result.out == out.end());
         assert(out == expected);
       }
 #endif // TEST_HAS_NO_LOCALIZATION
       {
-        ptr
diff _t n = 0;
+        std::ptr
diff _t n = 0;
         std::basic_string<CharT> out;
         std::format_to_n_result result = std::format_to_n(out.begin(), n, fmt, std::forward<Args>(args)...);
-        assert(result.size == static_cast<ptr
diff _t>(expected.size()));
+        assert(result.size == static_cast<std::ptr
diff _t>(expected.size()));
         assert(result.out == out.end());
         assert(out.empty());
       }
       {
-        ptr
diff _t n = expected.size() / 2;
+        std::ptr
diff _t n = expected.size() / 2;
         std::basic_string<CharT> out(n, CharT(' '));
         std::format_to_n_result result = std::format_to_n(out.begin(), n, fmt, std::forward<Args>(args)...);
-        assert(result.size == static_cast<ptr
diff _t>(expected.size()));
+        assert(result.size == static_cast<std::ptr
diff _t>(expected.size()));
         assert(result.out == out.end());
         assert(out == expected.substr(0, n));
       }

diff  --git a/libcxx/test/std/utilities/format/format.range/format.range.fmtkind/format_kind.compile.pass.cpp b/libcxx/test/std/utilities/format/format.range/format.range.fmtkind/format_kind.compile.pass.cpp
index d343ad1b1900b..7179a674a37ad 100644
--- a/libcxx/test/std/utilities/format/format.range/format.range.fmtkind/format_kind.compile.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.range/format.range.fmtkind/format_kind.compile.pass.cpp
@@ -47,7 +47,7 @@ struct recursive_range {
   struct iterator {
     using iterator_concept = std::input_iterator_tag;
     using value_type       = recursive_range;
-    using 
diff erence_type  = ptr
diff _t;
+    using 
diff erence_type  = std::ptr
diff _t;
     using reference        = recursive_range;
 
     reference operator*() const;

diff  --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.pass.cpp
index 36f7745b7713f..716acbfdcebde 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.pass.cpp
@@ -22,8 +22,8 @@ using Iterator = int*;
 class SizedSentinel {
 public:
     constexpr bool operator==(int*) const;
-    friend constexpr ptr
diff _t operator-(const SizedSentinel&, int*);
-    friend constexpr ptr
diff _t operator-(int*, const SizedSentinel&);
+    friend constexpr std::ptr
diff _t operator-(const SizedSentinel&, int*);
+    friend constexpr std::ptr
diff _t operator-(int*, const SizedSentinel&);
 };
 
 static_assert(std::sized_sentinel_for<SizedSentinel, Iterator>);

diff  --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_bytes.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_bytes.pass.cpp
index 0f5e2f0ae29ad..ee7e09ac1d655 100644
--- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_bytes.pass.cpp
+++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate_deallocate_bytes.pass.cpp
@@ -38,10 +38,10 @@ void test() {
     auto ptr                                      = static_cast<char*>(allocation);
     std::fill(ptr, ptr + 13, '0');
     assert(last_size == 13);
-    assert(last_alignment == alignof(max_align_t));
+    assert(last_alignment == alignof(std::max_align_t));
     allocator.deallocate_bytes(allocation, 13);
     assert(last_size == 13);
-    assert(last_alignment == alignof(max_align_t));
+    assert(last_alignment == alignof(std::max_align_t));
   }
   {
     void* allocation = allocator.allocate_bytes(13, 64);

diff  --git a/libcxx/test/support/test_iterators.h b/libcxx/test/support/test_iterators.h
index b03687447c14b..f0e19fc3d5e62 100644
--- a/libcxx/test/support/test_iterators.h
+++ b/libcxx/test/support/test_iterators.h
@@ -455,7 +455,7 @@ TEST_CONSTEXPR Iter base(Iter i) { return i; }
 template <typename T>
 struct ThrowingIterator {
     typedef std::bidirectional_iterator_tag iterator_category;
-    typedef ptr
diff _t                       
diff erence_type;
+    typedef std::ptr
diff _t                       
diff erence_type;
     typedef const T                         value_type;
     typedef const T *                       pointer;
     typedef const T &                       reference;
@@ -566,7 +566,7 @@ struct ThrowingIterator {
 template <typename T>
 struct NonThrowingIterator {
     typedef std::bidirectional_iterator_tag iterator_category;
-    typedef ptr
diff _t                       
diff erence_type;
+    typedef std::ptr
diff _t                       
diff erence_type;
     typedef const T                         value_type;
     typedef const T *                       pointer;
     typedef const T &                       reference;
@@ -916,7 +916,7 @@ class Iterator {
  public:
   using value_type = int;
   using reference = int&;
-  using 
diff erence_type = ptr
diff _t;
+  using 
diff erence_type = std::ptr
diff _t;
 
  private:
   value_type* ptr_ = nullptr;


        


More information about the libcxx-commits mailing list