diff --git a/src/UnitTests/Algorithms/distributedScanTest.h b/src/UnitTests/Algorithms/distributedScanTest.h
index 1ba5277d4bbbeef1b0e741e981a0a3dd270f18db..765e2427c44370c8f69380dc748ac6b0468d7e90 100644
--- a/src/UnitTests/Algorithms/distributedScanTest.h
+++ b/src/UnitTests/Algorithms/distributedScanTest.h
@@ -17,6 +17,12 @@ using namespace TNL::Algorithms;
 using namespace TNL::Algorithms::detail;
 using namespace TNL::MPI;
 
+// this is a workaround for an nvcc 11.7 bug: it drops the scope of enum class members in template function calls
+#ifdef HAVE_CUDA
+static constexpr auto Inclusive = TNL::Algorithms::detail::ScanType::Inclusive;
+static constexpr auto Exclusive = TNL::Algorithms::detail::ScanType::Exclusive;
+#endif
+
 /*
  * Light check of DistributedArray.
  *
diff --git a/src/UnitTests/Algorithms/scanTest.h b/src/UnitTests/Algorithms/scanTest.h
index 9611d7acd66c9b02c86bda2d4f91747a2f9f5687..fe794ef53ff75ac82fbd1d032bbbd278decfa072 100644
--- a/src/UnitTests/Algorithms/scanTest.h
+++ b/src/UnitTests/Algorithms/scanTest.h
@@ -15,6 +15,12 @@ using namespace TNL::Arithmetics;
 using namespace TNL::Algorithms;
 using namespace TNL::Algorithms::detail;
 
+// this is a workaround for an nvcc 11.7 bug: it drops the scope of enum class members in template function calls
+#ifdef HAVE_CUDA
+static constexpr auto Inclusive = TNL::Algorithms::detail::ScanType::Inclusive;
+static constexpr auto Exclusive = TNL::Algorithms::detail::ScanType::Exclusive;
+#endif
+
 // test fixture for typed tests
 template< typename Array >
 class ScanTest : public ::testing::Test