[libc++] Merge is_scoped_enum.h into is_enum.h (#99458)
This commit is contained in:
parent
fc65a9603b
commit
4dfa75c663
@ -793,7 +793,6 @@ set(files
|
||||
__type_traits/is_referenceable.h
|
||||
__type_traits/is_same.h
|
||||
__type_traits/is_scalar.h
|
||||
__type_traits/is_scoped_enum.h
|
||||
__type_traits/is_signed.h
|
||||
__type_traits/is_signed_integer.h
|
||||
__type_traits/is_specialization.h
|
||||
|
@ -26,6 +26,16 @@ template <class _Tp>
|
||||
inline constexpr bool is_enum_v = __is_enum(_Tp);
|
||||
#endif
|
||||
|
||||
#if _LIBCPP_STD_VER >= 23
|
||||
|
||||
template <class _Tp>
|
||||
struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {};
|
||||
|
||||
template <class _Tp>
|
||||
inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp);
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 23
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP___TYPE_TRAITS_IS_ENUM_H
|
||||
|
@ -1,33 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H
|
||||
#define _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H
|
||||
|
||||
#include <__config>
|
||||
#include <__type_traits/integral_constant.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if _LIBCPP_STD_VER >= 23
|
||||
|
||||
template <class _Tp>
|
||||
struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {};
|
||||
|
||||
template <class _Tp>
|
||||
inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp);
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 23
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H
|
@ -2009,7 +2009,6 @@ module std_private_type_traits_is_scalar [system
|
||||
header "__type_traits/is_scalar.h"
|
||||
export std_private_type_traits_is_null_pointer
|
||||
}
|
||||
module std_private_type_traits_is_scoped_enum [system] { header "__type_traits/is_scoped_enum.h" }
|
||||
module std_private_type_traits_is_signed [system] { header "__type_traits/is_signed.h" }
|
||||
module std_private_type_traits_is_signed_integer [system] { header "__type_traits/is_signed_integer.h" }
|
||||
module std_private_type_traits_is_specialization [system] { header "__type_traits/is_specialization.h" }
|
||||
|
@ -514,10 +514,6 @@ namespace std
|
||||
# include <__type_traits/unwrap_ref.h>
|
||||
#endif
|
||||
|
||||
#if _LIBCPP_STD_VER >= 23
|
||||
# include <__type_traits/is_scoped_enum.h>
|
||||
#endif
|
||||
|
||||
#include <version>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
|
Loading…
x
Reference in New Issue
Block a user