[libcxx-commits] [PATCH] D137127: [libc++abi] Use std::nullptr_t instead of declaring it manually
Ryan Prichard via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Nov 4 15:52:13 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG292533324cad: [libc++abi] Use std::nullptr_t instead of declaring it manually (authored by rprichard).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137127/new/
https://reviews.llvm.org/D137127
Files:
libcxxabi/test/catch_reference_nullptr.pass.cpp
Index: libcxxabi/test/catch_reference_nullptr.pass.cpp
===================================================================
--- libcxxabi/test/catch_reference_nullptr.pass.cpp
+++ libcxxabi/test/catch_reference_nullptr.pass.cpp
@@ -6,11 +6,13 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03,
+// UNSUPPORTED: c++03
// UNSUPPORTED: no-exceptions
#include <cassert>
+#include <cstddef>
#include <cstdlib>
+#include <type_traits>
struct A {};
@@ -27,13 +29,13 @@
int main(int, char**)
{
- using nullptr_t = decltype(nullptr);
+ static_assert(std::is_same<std::nullptr_t, decltype(nullptr)>::value, "");
// A reference to nullptr_t can catch nullptr.
- catch_nullptr_test<nullptr_t, true>();
- catch_nullptr_test<const nullptr_t, true>();
- catch_nullptr_test<volatile nullptr_t, true>();
- catch_nullptr_test<const volatile nullptr_t, true>();
+ catch_nullptr_test<std::nullptr_t, true>();
+ catch_nullptr_test<const std::nullptr_t, true>();
+ catch_nullptr_test<volatile std::nullptr_t, true>();
+ catch_nullptr_test<const volatile std::nullptr_t, true>();
// No other reference type can.
#if 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137127.473356.patch
Type: text/x-patch
Size: 1193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221104/281c613c/attachment.bin>
More information about the libcxx-commits
mailing list