aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/patches/05-compiler-msvc.patch
blob: 7fd238b6e0514d016d0f4bf4581499d580047f72 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff --git a/include/__functional/bind.h b/include/__functional/bind.h
index b4f4644..3996460 100644
--- a/include/__functional/bind.h
+++ b/include/__functional/bind.h
@@ -231,6 +231,10 @@ public:
   }
 };
 
+#  if defined(__CUDACC__) && defined(_MSC_VER)
+#    define Y_CUDAFE_MSVC_BUG
+#  endif
+
 template <class _Fp, class... _BoundArgs>
 struct is_bind_expression<__bind<_Fp, _BoundArgs...> > : public true_type {};
 
@@ -238,7 +242,11 @@ template <class _Rp, class _Fp, class... _BoundArgs>
 class __bind_r : public __bind<_Fp, _BoundArgs...> {
   typedef __bind<_Fp, _BoundArgs...> base;
   typedef typename base::_Fd _Fd;
+#  if !defined(Y_CUDAFE_MSVC_BUG)
   typedef typename base::_Td _Td;
+#  else
+  typedef typename tuple<typename decay<_BoundArgs>::type...> _Td;
+#  endif
 
 public:
   typedef _Rp result_type;