From 0b08654ad6f753cb1b5c2a85e50fe6b1c4d8caf2 Mon Sep 17 00:00:00 2001 From: Stephen Xu Date: Fri, 3 Jun 2022 15:36:06 +0100 Subject: [PATCH] Don't use default function when working with CUDA. --- glm/detail/setup.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index d9ca27dc..3343a7b4 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -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