1 //===-- is_void 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_VOID_H 9 #define LLVM_LIBC_SRC___SUPPORT_CPP_TYPE_TRAITS_IS_VOID_H 10 11 #include "src/__support/CPP/type_traits/is_same.h" 12 #include "src/__support/CPP/type_traits/remove_cv.h" 13 #include "src/__support/macros/attributes.h" 14 #include "src/__support/macros/config.h" 15 16 namespace LIBC_NAMESPACE_DECL { 17 namespace cpp { 18 19 // is_void 20 template <typename T> struct is_void : is_same<void, remove_cv_t<T>> {}; 21 template <typename T> 22 LIBC_INLINE_VAR constexpr bool is_void_v = is_void<T>::value; 23 24 } // namespace cpp 25 } // namespace LIBC_NAMESPACE_DECL 26 27 #endif // LLVM_LIBC_SRC___SUPPORT_CPP_TYPE_TRAITS_IS_VOID_H 28