diff --git a/include/ginkgo/core/base/std_extensions.hpp b/include/ginkgo/core/base/std_extensions.hpp index 893b2b0d865..a950fcc2003 100644 --- a/include/ginkgo/core/base/std_extensions.hpp +++ b/include/ginkgo/core/base/std_extensions.hpp @@ -27,8 +27,24 @@ namespace gko { * @ingroup xstd */ namespace xstd { +namespace detail { + + +template +struct make_void { + using type = void; +}; + + +} // namespace detail + + +/** + * Use the custom implementation, since the std::void_t used in + * is_matrix_type_builder seems to trigger a compiler bug in GCC 7.5. + */ template -using void_t = std::void_t; +using void_t = typename detail::make_void::type; GKO_DEPRECATED("use std::uncaught_exceptions") diff --git a/include/ginkgo/core/distributed/matrix.hpp b/include/ginkgo/core/distributed/matrix.hpp index 1e5e33581a9..de719bb9315 100644 --- a/include/ginkgo/core/distributed/matrix.hpp +++ b/include/ginkgo/core/distributed/matrix.hpp @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -55,7 +56,7 @@ struct is_matrix_type_builder : std::false_type {}; template struct is_matrix_type_builder< Builder, ValueType, IndexType, - std::void_t< + xstd::void_t< decltype(std::declval().template create( std::declval>()))>> : std::true_type {};