From 61ece703aff8a26f9603f5a6db8bc781296c0ffa Mon Sep 17 00:00:00 2001 From: Olivier BICHLER <olivier.bichler@cea.fr> Date: Fri, 28 Mar 2025 18:08:57 +0100 Subject: [PATCH] Fix compilation issue with NVCC --- include/aidge/utils/DynamicAttributes.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/aidge/utils/DynamicAttributes.hpp b/include/aidge/utils/DynamicAttributes.hpp index 03513a5d8..7e1b465ff 100644 --- a/include/aidge/utils/DynamicAttributes.hpp +++ b/include/aidge/utils/DynamicAttributes.hpp @@ -451,10 +451,9 @@ namespace std { struct hash<Container<T, Args...>> { std::size_t operator()(const Container<T, Args...>& iterable) const { std::size_t seed = 0; - for (const auto& v : iterable) { + for (const typename Container<T, Args...>::value_type& v : iterable) { // Recursively hash the value pointed by the iterator - // Use decltype(v) instead of T to make it work for std::map for example. - Aidge::hash_combine(seed, std::hash<std::remove_const_t<std::remove_reference_t<decltype(v)>>>()(v)); + Aidge::hash_combine(seed, std::hash<std::remove_const_t<std::remove_reference_t<typename Container<T, Args...>::value_type>>>()(v)); } return seed; } -- GitLab