1 //===----------------------------------------------------------------------===// 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 9 #ifndef _LIBCPP___TYPE_TRAITS_REMOVE_CV_H 10 #define _LIBCPP___TYPE_TRAITS_REMOVE_CV_H 11 12 #include <__config> 13 #include <__type_traits/remove_const.h> 14 #include <__type_traits/remove_volatile.h> 15 16 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 17 # pragma GCC system_header 18 #endif 19 20 _LIBCPP_BEGIN_NAMESPACE_STD 21 22 #if __has_builtin(__remove_cv) 23 template <class _Tp> 24 struct remove_cv { 25 using type _LIBCPP_NODEBUG = __remove_cv(_Tp); 26 }; 27 28 template <class _Tp> 29 using __remove_cv_t = __remove_cv(_Tp); 30 #else 31 template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv 32 {typedef __remove_volatile_t<__remove_const_t<_Tp> > type;}; 33 34 template <class _Tp> 35 using __remove_cv_t = __remove_volatile_t<__remove_const_t<_Tp> >; 36 #endif // __has_builtin(__remove_cv) 37 38 #if _LIBCPP_STD_VER >= 14 39 template <class _Tp> using remove_cv_t = __remove_cv_t<_Tp>; 40 #endif 41 42 _LIBCPP_END_NAMESPACE_STD 43 44 #endif // _LIBCPP___TYPE_TRAITS_REMOVE_CV_H 45