aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/patches/74-no-builtin_remove_reference_clang14.patch
blob: 1299c9899015f5e215985bdc7d4b1699260aa124 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/include/__type_traits/remove_reference.h b/include/__type_traits/remove_reference.h
index ba67891..ef11b16 100644
--- a/include/__type_traits/remove_reference.h
+++ b/include/__type_traits/remove_reference.h
@@ -34,7 +34,13 @@ struct remove_reference {
 template <class _Tp>
 using __libcpp_remove_reference_t = typename remove_reference<_Tp>::type;
 #else
-#  error "remove_reference not implemented!"
+// clang-format off
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference        {typedef _LIBCPP_NODEBUG _Tp type;};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&>  {typedef _LIBCPP_NODEBUG _Tp type;};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG _Tp type;};
+// clang-format on
+template <class _Tp>
+using __libcpp_remove_reference_t = typename remove_reference<_Tp>::type;
 #endif // __has_builtin(__remove_reference_t)
 
 #if _LIBCPP_STD_VER >= 14