Procházet zdrojové kódy

Implement LWG 3039 and 3041 - 'Treating Unnecessary decay'.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@328054 91177308-0d34-0410-b5e6-96231b3b80d8
Marshall Clow před 7 roky
rodič
revize
483bc7c64a
2 změnil soubory, kde provedl 5 přidání a 5 odebrání
  1. 4 4
      include/future
  2. 1 1
      include/thread

+ 4 - 4
include/future

@@ -2021,7 +2021,7 @@ public:
               class = typename enable_if
               class = typename enable_if
               <
               <
                   !is_same<
                   !is_same<
-                      typename decay<_Fp>::type, 
+                      typename __uncvref<_Fp>::type, 
                       packaged_task
                       packaged_task
                       >::value
                       >::value
                   >::type
                   >::type
@@ -2032,7 +2032,7 @@ public:
               class = typename enable_if
               class = typename enable_if
               <
               <
                   !is_same<
                   !is_same<
-                      typename decay<_Fp>::type, 
+                      typename __uncvref<_Fp>::type, 
                       packaged_task
                       packaged_task
                       >::value
                       >::value
                   >::type
                   >::type
@@ -2150,7 +2150,7 @@ public:
               class = typename enable_if
               class = typename enable_if
               <
               <
                   !is_same<
                   !is_same<
-                      typename decay<_Fp>::type, 
+                      typename __uncvref<_Fp>::type, 
                       packaged_task
                       packaged_task
                       >::value
                       >::value
                   >::type
                   >::type
@@ -2161,7 +2161,7 @@ public:
               class = typename enable_if
               class = typename enable_if
               <
               <
                   !is_same<
                   !is_same<
-                      typename decay<_Fp>::type, 
+                      typename __uncvref<_Fp>::type, 
                       packaged_task
                       packaged_task
                       >::value
                       >::value
                   >::type
                   >::type

+ 1 - 1
include/thread

@@ -298,7 +298,7 @@ public:
     template <class _Fp, class ..._Args,
     template <class _Fp, class ..._Args,
               class = typename enable_if
               class = typename enable_if
               <
               <
-                   !is_same<typename decay<_Fp>::type, thread>::value
+                   !is_same<typename __uncvref<_Fp>::type, thread>::value
               >::type
               >::type
              >
              >
         _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
         _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS