Skip to content

Commit

Permalink
Don't use default function when working with CUDA.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-hqxu committed Jun 3, 2022
1 parent cc98465 commit 0b08654
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions glm/detail/setup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,16 @@
// N2346
#if GLM_COMPILER & GLM_COMPILER_CLANG
# define GLM_HAS_DEFAULTED_FUNCTIONS __has_feature(cxx_defaulted_functions)
#elif GLM_COMPILER & GLM_COMPILER_CUDA
// Do not use defaulted functions for CUDA compiler when function qualifiers are present
# define GLM_HAS_DEFAULTED_FUNCTIONS 0
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
# define GLM_HAS_DEFAULTED_FUNCTIONS 1
#else
# define GLM_HAS_DEFAULTED_FUNCTIONS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
((GLM_COMPILER & GLM_COMPILER_INTEL)) || \
(GLM_COMPILER & GLM_COMPILER_CUDA)) || \
((GLM_COMPILER & GLM_COMPILER_HIP)))
((GLM_COMPILER & GLM_COMPILER_HIP))))
#endif

// N2118
Expand Down

0 comments on commit 0b08654

Please sign in to comment.