From 517ed29228d18cf2c5004d10826090108e06f049 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 7 Nov 2022 14:00:32 -0800 Subject: [PATCH] Fix GSL_SUPPRESS definition when nvcc is in-use (#1064) --- include/gsl/assert | 2 +- include/gsl/byte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/gsl/assert b/include/gsl/assert index a601204..a5c216f 100644 --- a/include/gsl/assert +++ b/include/gsl/assert @@ -48,7 +48,7 @@ #if defined(__clang__) #define GSL_SUPPRESS(x) [[gsl::suppress("x")]] #else -#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__NVCC__) #define GSL_SUPPRESS(x) [[gsl::suppress(x)]] #else #define GSL_SUPPRESS(x) diff --git a/include/gsl/byte b/include/gsl/byte index 9231340..f92a91c 100644 --- a/include/gsl/byte +++ b/include/gsl/byte @@ -24,7 +24,7 @@ #if defined(__clang__) #define GSL_SUPPRESS(x) [[gsl::suppress("x")]] #else -#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__NVCC__) #define GSL_SUPPRESS(x) [[gsl::suppress(x)]] #else #define GSL_SUPPRESS(x)