diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2020-02-26 23:19:34 +0100 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2020-02-26 23:19:34 +0100 |
commit | 53579deb2d551752b503b7b76ac04885ec354470 (patch) | |
tree | 8fd979d328b773012c31114c8bd2212834adf579 /src/python/gudhi/clustering | |
parent | d38d7352d9dd360fa779f83442e84c5375cf62e2 (diff) |
Bug in gcc-8
Diffstat (limited to 'src/python/gudhi/clustering')
-rw-r--r-- | src/python/gudhi/clustering/_tomato.cc | 7 |
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. |