Skip to content
Snippets Groups Projects
Commit 61ece703 authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fix compilation issue with NVCC

parent 9c1832f9
No related branches found
No related tags found
3 merge requests!414Update version 0.5.1 -> 0.6.0,!408[Add] Dropout Operator,!377Add TopK operator
Pipeline #69201 passed
...@@ -451,10 +451,9 @@ namespace std { ...@@ -451,10 +451,9 @@ namespace std {
struct hash<Container<T, Args...>> { struct hash<Container<T, Args...>> {
std::size_t operator()(const Container<T, Args...>& iterable) const { std::size_t operator()(const Container<T, Args...>& iterable) const {
std::size_t seed = 0; 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 // 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<typename Container<T, Args...>::value_type>>>()(v));
Aidge::hash_combine(seed, std::hash<std::remove_const_t<std::remove_reference_t<decltype(v)>>>()(v));
} }
return seed; return seed;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment