mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-30 12:43:52 +00:00
fix(NVCC): warning supression pragma fix for CUDA >= 11.5 (#851)
CUDA 11.5 deprecated (and CUDA 12.0 removed) diagnostic pragmas such as diag_suppress and diag_default. Replacement pragmas were previxed with nv_, i.e. nv_diag_suppress __NVCC_DIAG_PRAGMA_SUPPORT__ is defined if the prefixed versions are available.
This commit is contained in:
parent
484fa22cf3
commit
fc9cea6d76
@ -159,11 +159,19 @@ template <typename T, typename C> class is_direct_constructible {
|
|||||||
static auto test(int, std::true_type) -> decltype(
|
static auto test(int, std::true_type) -> decltype(
|
||||||
// NVCC warns about narrowing conversions here
|
// NVCC warns about narrowing conversions here
|
||||||
#ifdef __CUDACC__
|
#ifdef __CUDACC__
|
||||||
|
#ifdef __NVCC_DIAG_PRAGMA_SUPPORT__
|
||||||
|
#pragma nv_diag_suppress 2361
|
||||||
|
#else
|
||||||
#pragma diag_suppress 2361
|
#pragma diag_suppress 2361
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
TT{std::declval<CC>()}
|
TT{std::declval<CC>()}
|
||||||
#ifdef __CUDACC__
|
#ifdef __CUDACC__
|
||||||
|
#ifdef __NVCC_DIAG_PRAGMA_SUPPORT__
|
||||||
|
#pragma nv_diag_default 2361
|
||||||
|
#else
|
||||||
#pragma diag_default 2361
|
#pragma diag_default 2361
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
std::is_move_assignable<TT>());
|
std::is_move_assignable<TT>());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user