aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/patches/05-compiler-msvc.patch
blob: a40b79228dcc24ff21720d04bc649c17665e818c (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 19e7d82..92d9bbd 100644
--- a/include/__functional/bind.h
+++ b/include/__functional/bind.h
@@ -230,6 +230,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 {};
 
@@ -237,7 +241,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;