Skip to content

Commit a279bf0

Browse files
authored
[libc] Add is_null_pointer_v (#65627)
1 parent 77fc549 commit a279bf0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libc/src/__support/CPP/type_traits/is_null_pointer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ namespace __llvm_libc::cpp {
1818
using nullptr_t = decltype(nullptr);
1919
template <class T>
2020
struct is_null_pointer : cpp::is_same<cpp::nullptr_t, cpp::remove_cv_t<T>> {};
21+
template <class T>
22+
LIBC_INLINE_VAR constexpr bool is_null_pointer_v = is_null_pointer<T>::value;
2123

2224
} // namespace __llvm_libc::cpp
2325

0 commit comments

Comments
 (0)