Fix NVCC builds for CUDA 10+.
diff --git a/Eigen/src/Core/RandomImpl.h b/Eigen/src/Core/RandomImpl.h
index e82da96..76e43f5 100644
--- a/Eigen/src/Core/RandomImpl.h
+++ b/Eigen/src/Core/RandomImpl.h
@@ -115,6 +115,7 @@
   }
 };
 
+#if !EIGEN_COMP_NVCC
 // random implementation for long double
 // this specialization is not compatible with double-double scalars
 template <bool Specialize = (sizeof(long double) == 2 * sizeof(uint64_t)) &&
@@ -146,6 +147,7 @@
 };
 template <>
 struct random_float_impl<long double> : random_longdouble_impl<> {};
+#endif
 
 template <typename Scalar>
 struct random_default_impl<Scalar, false, false> {
diff --git a/Eigen/src/Core/util/DisableStupidWarnings.h b/Eigen/src/Core/util/DisableStupidWarnings.h
index 32a427d..ab0c542 100644
--- a/Eigen/src/Core/util/DisableStupidWarnings.h
+++ b/Eigen/src/Core/util/DisableStupidWarnings.h
@@ -83,7 +83,7 @@
 #endif
 #endif
 
-#if defined __NVCC__
+#if defined __NVCC__ && defined __CUDACC__
 // MSVC 14.16 (required by CUDA 9.*) does not support the _Pragma keyword, so
 // we instead use Microsoft's __pragma extension.
 #if defined _MSC_VER
diff --git a/Eigen/src/Core/util/IndexedViewHelper.h b/Eigen/src/Core/util/IndexedViewHelper.h
index 59486ea..fd8215e 100644
--- a/Eigen/src/Core/util/IndexedViewHelper.h
+++ b/Eigen/src/Core/util/IndexedViewHelper.h
@@ -69,7 +69,7 @@
 #else
 // Using a FixedExpr<1> expression is important here to make sure the compiler
 // can fully optimize the computation starting indices with zero overhead.
-static constexpr lastp1_t lastp1(last + fix<1>());
+static constexpr lastp1_t lastp1;
 #endif
 
 /** \var end
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h
index 226844f..fb56051 100644
--- a/Eigen/src/Core/util/Macros.h
+++ b/Eigen/src/Core/util/Macros.h
@@ -1083,14 +1083,7 @@
 #define EIGEN_USING_STD(FUNC) using std::FUNC;
 #endif
 
-#if EIGEN_COMP_MSVC_STRICT && EIGEN_COMP_NVCC
-// Wwhen compiling with NVCC, using the base operator is necessary,
-//   otherwise we get duplicate definition errors
-// For later MSVC versions, we require explicit operator= definition, otherwise we get
-//   use of implicitly deleted operator errors.
-// (cf Bugs 920, 1000, 1324, 2291)
-#define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) using Base::operator=;
-#elif EIGEN_COMP_CLANG  // workaround clang bug (see http://forum.kde.org/viewtopic.php?f=74&t=102653)
+#if EIGEN_COMP_CLANG  // workaround clang bug (see http://forum.kde.org/viewtopic.php?f=74&t=102653)
 #define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived)                                           \
   using Base::operator=;                                                                           \
   EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) {                 \