File tree 3 files changed +32
-0
lines changed
utils/bazel/llvm-project-overlay/libc
3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 30
30
#include " src/__support/CPP/type_traits/is_function.h"
31
31
#include " src/__support/CPP/type_traits/is_integral.h"
32
32
#include " src/__support/CPP/type_traits/is_lvalue_reference.h"
33
+ #include " src/__support/CPP/type_traits/is_member_pointer.h"
33
34
#include " src/__support/CPP/type_traits/is_null_pointer.h"
34
35
#include " src/__support/CPP/type_traits/is_pointer.h"
35
36
#include " src/__support/CPP/type_traits/is_reference.h"
Original file line number Diff line number Diff line change
1
+ // ===-- is_member_pointer type_traits ---------------------------*- C++ -*-===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ // ===----------------------------------------------------------------------===//
8
+ #ifndef LLVM_LIBC_SRC_SUPPORT_CPP_TYPE_TRAITS_IS_MEMBER_POINTER_H
9
+ #define LLVM_LIBC_SRC_SUPPORT_CPP_TYPE_TRAITS_IS_MEMBER_POINTER_H
10
+
11
+ #include " src/__support/CPP/type_traits/false_type.h"
12
+ #include " src/__support/CPP/type_traits/remove_cv.h"
13
+ #include " src/__support/CPP/type_traits/true_type.h"
14
+ #include " src/__support/macros/attributes.h"
15
+
16
+ namespace __llvm_libc ::cpp {
17
+
18
+ // is_member_pointer
19
+ template <class T > struct is_member_pointer_helper : cpp::false_type {};
20
+ template <class T , class U >
21
+ struct is_member_pointer_helper <T U::*> : cpp::true_type {};
22
+ template <class T >
23
+ struct is_member_pointer : is_member_pointer_helper<cpp::remove_cv_t <T>> {};
24
+ template <class T >
25
+ LIBC_INLINE_VAR constexpr bool is_member_pointer_v =
26
+ is_member_pointer<T>::value;
27
+
28
+ } // namespace __llvm_libc::cpp
29
+
30
+ #endif // LLVM_LIBC_SRC_SUPPORT_CPP_TYPE_TRAITS_IS_MEMBER_POINTER_H
Original file line number Diff line number Diff line change @@ -307,6 +307,7 @@ libc_support_library(
307
307
"src/__support/CPP/type_traits/is_function.h" ,
308
308
"src/__support/CPP/type_traits/is_integral.h" ,
309
309
"src/__support/CPP/type_traits/is_lvalue_reference.h" ,
310
+ "src/__support/CPP/type_traits/is_member_pointer.h" ,
310
311
"src/__support/CPP/type_traits/is_null_pointer.h" ,
311
312
"src/__support/CPP/type_traits/is_pointer.h" ,
312
313
"src/__support/CPP/type_traits/is_reference.h" ,
You can’t perform that action at this time.
0 commit comments