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 32
32
#include " src/__support/CPP/type_traits/is_lvalue_reference.h"
33
33
#include " src/__support/CPP/type_traits/is_member_pointer.h"
34
34
#include " src/__support/CPP/type_traits/is_null_pointer.h"
35
+ #include " src/__support/CPP/type_traits/is_object.h"
35
36
#include " src/__support/CPP/type_traits/is_pointer.h"
36
37
#include " src/__support/CPP/type_traits/is_reference.h"
37
38
#include " src/__support/CPP/type_traits/is_rvalue_reference.h"
Original file line number Diff line number Diff line change
1
+ // ===-- is_object 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_OBJECT_H
9
+ #define LLVM_LIBC_SRC_SUPPORT_CPP_TYPE_TRAITS_IS_OBJECT_H
10
+
11
+ #include " src/__support/CPP/type_traits/bool_constant.h"
12
+ #include " src/__support/CPP/type_traits/is_array.h"
13
+ #include " src/__support/CPP/type_traits/is_class.h"
14
+ #include " src/__support/CPP/type_traits/is_scalar.h"
15
+ #include " src/__support/CPP/type_traits/is_union.h"
16
+ #include " src/__support/macros/attributes.h"
17
+
18
+ namespace __llvm_libc ::cpp {
19
+
20
+ // is_object
21
+ template <class T >
22
+ struct is_object
23
+ : cpp::bool_constant<cpp::is_scalar_v<T> || cpp::is_array_v<T> ||
24
+ cpp::is_union_v<T> || cpp::is_class_v<T>> {};
25
+ template <class T >
26
+ LIBC_INLINE_VAR constexpr bool is_object_v = is_object<T>::value;
27
+
28
+ } // namespace __llvm_libc::cpp
29
+
30
+ #endif // LLVM_LIBC_SRC_SUPPORT_CPP_TYPE_TRAITS_IS_OBJECT_H
Original file line number Diff line number Diff line change @@ -309,6 +309,7 @@ libc_support_library(
309
309
"src/__support/CPP/type_traits/is_lvalue_reference.h" ,
310
310
"src/__support/CPP/type_traits/is_member_pointer.h" ,
311
311
"src/__support/CPP/type_traits/is_null_pointer.h" ,
312
+ "src/__support/CPP/type_traits/is_object.h" ,
312
313
"src/__support/CPP/type_traits/is_pointer.h" ,
313
314
"src/__support/CPP/type_traits/is_reference.h" ,
314
315
"src/__support/CPP/type_traits/is_rvalue_reference.h" ,
You can’t perform that action at this time.
0 commit comments