summaryrefslogtreecommitdiff
path: root/src/python/gudhi/clustering/_tomato.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/gudhi/clustering/_tomato.cc')
-rw-r--r--src/python/gudhi/clustering/_tomato.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/python/gudhi/clustering/_tomato.cc b/src/python/gudhi/clustering/_tomato.cc
index 1c896174..746c4254 100644
--- a/src/python/gudhi/clustering/_tomato.cc
+++ b/src/python/gudhi/clustering/_tomato.cc
@@ -18,8 +18,11 @@ namespace py=pybind11;
template<class T, class=std::enable_if_t<std::is_integral<T>::value>>
int getint(int i){return i;}
-template<class T, class=decltype(std::declval<T>().template cast<int>())>
-int getint(T i){return i.template cast<int>();}
+// Gcc-8 has a bug that breaks this version, fixed in gcc-9
+// template<class T, class=decltype(std::declval<T>().template cast<int>())>
+// int getint(T i){return i.template cast<int>();}
+template<class T>
+auto getint(T i)->decltype(i.template cast<int>()){return i.template cast<int>();}
// Raw clusters are clusters obtained through single-linkage, no merging.