From 92ad5b8f74448959c40780ab8d0608f8693aaa9b Mon Sep 17 00:00:00 2001 From: Julian Lenz Date: Sun, 18 Dec 2022 15:50:19 +0000 Subject: [PATCH] Compiler error fix: NVCC requires names for templ. par. --- Grid/qcd/utils/GaugeGroup.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Grid/qcd/utils/GaugeGroup.h b/Grid/qcd/utils/GaugeGroup.h index 24b89945..dc2c99c1 100644 --- a/Grid/qcd/utils/GaugeGroup.h +++ b/Grid/qcd/utils/GaugeGroup.h @@ -32,15 +32,17 @@ directory #ifndef QCD_UTIL_SUN_H #define QCD_UTIL_SUN_H +// Important detail: nvcc requires all template parameters to have names. +// This is the only reason why the second template parameter has a name. #define ONLY_IF_SU \ typename dummy_name = group_name, \ - typename = std::enable_if_t < \ + typename named_dummy = std::enable_if_t < \ std::is_same::value && \ is_su::value > #define ONLY_IF_Sp \ typename dummy_name = group_name, \ - typename = std::enable_if_t < \ + typename named_dummy = std::enable_if_t < \ std::is_same::value && \ is_sp::value >